[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/ws-butler a7f62dcb00 17/64: fix bug when point is after a
From: |
Stefan Kangas |
Subject: |
[nongnu] elpa/ws-butler a7f62dcb00 17/64: fix bug when point is after a tab at save time |
Date: |
Fri, 31 Dec 2021 11:09:28 -0500 (EST) |
branch: elpa/ws-butler
commit a7f62dcb0083585b6f7040b9bb5b64cb16468ddb
Author: Le Wang <le.wang@agworld.com.au>
Commit: Le Wang <le.wang@agworld.com.au>
fix bug when point is after a tab at save time
#1
---
ws-butler.el | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/ws-butler.el b/ws-butler.el
index 9f5ac79417..4a67b2936e 100644
--- a/ws-butler.el
+++ b/ws-butler.el
@@ -129,7 +129,10 @@ replaced by spaces.
This will also ensure point doesn't jump due to white space
trimming. (i.e. keep whitespace after EOL text but before
point."
- (setq ws-butler-presave-coord nil)
+ ;; save data to restore later
+ (setq ws-butler-presave-coord (list
+ (line-number-at-pos (point))
+ (current-column)))
(let (last-end)
(ws-butler-map-changes
(lambda (_prop beg end)
@@ -138,11 +141,6 @@ point."
(point-at-bol))
end (progn (goto-char end)
(point-at-eol))))
- (when (and (>= (point) beg)
- (<= (point) end))
- (setq ws-butler-presave-coord (list
- (line-number-at-pos (point))
- (current-column))))
(ws-butler-clean-region beg end)
(setq last-end end)))
;; trim EOF newlines if required
- [nongnu] branch elpa/ws-butler created (now e3a38d93e0), Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler 8c495cfca3 16/64: explain meaning of "unobtrusiveness", Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler fb5d5fd35e 11/64: clean up leading tabs when "indent-tabs-mode" is nil, Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler de6936dd55 29/64: Bump version, run checkdoc., Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler e6c6454c16 05/64: readme update, Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler 00e9ca4ace 03/64: commentary update, Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler 8e441f8778 01/64: initial commit, Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler 90f7cbd14f 02/64: add README, Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler a7f62dcb00 17/64: fix bug when point is after a tab at save time,
Stefan Kangas <=
- [nongnu] elpa/ws-butler bb70ff8fe3 14/64: fix saving what point is at EOB, Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler 8c4cb5485a 28/64: Use (1- end) to hack around highlight-changes bug., Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler c5b920b6b6 32/64: Merge pull request #10 from DarwinAwardWinner/patch-1, Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler 631db62b31 40/64: README.md typo., Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler 0fbba548ff 38/64: Bump to 0.3, Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler 88b4570b31 15/64: add autoload cookies and global minor-mode, Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler c906d77aee 10/64: provide feature #1, Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler ec4172bb7a 22/64: Add debug declaration to macro., Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler e80d0df3e3 20/64: ignore PGP sig error in travis setting, Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler 404e70e75a 43/64: Tabify indentation for non-nil indent-tabs-mode, Stefan Kangas, 2021/12/31