[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/ws-butler 8ca373047a 24/64: Fix point moving if after blan
From: |
Stefan Kangas |
Subject: |
[nongnu] elpa/ws-butler 8ca373047a 24/64: Fix point moving if after blanks. |
Date: |
Fri, 31 Dec 2021 11:09:29 -0500 (EST) |
branch: elpa/ws-butler
commit 8ca373047a368df520e06400f916cd8429e1c354
Author: Le Wang <le.wang@agworld.com.au>
Commit: Le Wang <le.wang@agworld.com.au>
Fix point moving if after blanks.
- fixes #5
---
ws-butler.el | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/ws-butler.el b/ws-butler.el
index 09d2f00c01..5f0298c73f 100644
--- a/ws-butler.el
+++ b/ws-butler.el
@@ -188,13 +188,14 @@ point."
(highlight-changes-mode 1)
;; go to saved line+col
(when ws-butler-presave-coord
- (ws-butler-with-save
- (widen)
- (goto-char (point-min))
- (let ((remaining-lines (forward-line (1- (car ws-butler-presave-coord)))))
- (unless (eq remaining-lines 0)
- (insert (make-string remaining-lines ?\n))))
- (move-to-column (cadr ws-butler-presave-coord) t)))
+ (let (remaining-lines)
+ (ws-butler-with-save
+ (widen)
+ (goto-char (point-min))
+ (setq remaining-lines (forward-line (1- (car
ws-butler-presave-coord)))))
+ (unless (eq remaining-lines 0)
+ (insert (make-string remaining-lines ?\n))))
+ (move-to-column (cadr ws-butler-presave-coord) t))
(set-buffer-modified-p nil))
(defun ws-butler-before-revert ()
- [nongnu] elpa/ws-butler b59e36b245 53/64: bump version to 0.5, (continued)
- [nongnu] elpa/ws-butler b59e36b245 53/64: bump version to 0.5, Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler 7d57ac7cf6 42/64: Added `ws-butler-trim-predicate' custom variable, Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler 6f46d5885a 63/64: Revert "Inhibit modification hooks in ws-butler-after-save", Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler b9bcf50496 60/64: Inhibit modification hooks in ws-butler-after-save, Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler af050ffb6c 09/64: fix typo in commentary #1, Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler a5c01e3221 06/64: remove debug message, Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler 45a93f2bc2 18/64: add Travis-CI tests skeleton, Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler 0c941aedeb 31/64: Declare type of keep-whitespace-before-point, Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler 7d30203cf9 19/64: forgot to trim blanks in README (oh the irony!), Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler fe08e8770b 08/64: update lighter, Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler 8ca373047a 24/64: Fix point moving if after blanks.,
Stefan Kangas <=
- [nongnu] elpa/ws-butler 4154816145 27/64: Clean up end marker., Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler 106d313c0d 30/64: Fix package problems; bump version to 0.3., Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler 34393f1aaa 07/64: add install instructions, Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler 75deadecb9 35/64: Remove dependency on highlight-changes-mode., Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler ee0fc31020 52/64: Merge branch 'xificurC-master', Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler 76265d11f8 44/64: Debian and Ubuntu installation instructions, Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler 7553d6392a 36/64: Handle adding back text during undo correctly., Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler aa1935f150 37/64: update documentation re: highlight-changes-mode, Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler 11311538f6 50/64: fix up tests, simplify predicate code a bit., Stefan Kangas, 2021/12/31
- [nongnu] elpa/ws-butler a998a23ee8 41/64: Clarify ws-butler-keep-whitespace-before-point docs., Stefan Kangas, 2021/12/31