emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/vlf c0a85cd 159/310: Fix position when moving to overla


From: Stefan Monnier
Subject: [elpa] externals/vlf c0a85cd 159/310: Fix position when moving to overlapping chunk.
Date: Sat, 28 Nov 2020 00:33:07 -0500 (EST)

branch: externals/vlf
commit c0a85cdcfef9ea6a3c712165c692a732e93f90b6
Author: Andrey Kotlarski <m00naticus@gmail.com>
Commit: Andrey Kotlarski <m00naticus@gmail.com>

    Fix position when moving to overlapping chunk.
---
 vlf.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/vlf.el b/vlf.el
index e6c34e6..adcdad9 100644
--- a/vlf.el
+++ b/vlf.el
@@ -412,10 +412,12 @@ Return t if move hasn't been canceled."
                   (goto-char (point-min))
                   (insert (delete-and-extract-region edit-end-pos
                                                      (point-max)))))))
-        (setq vlf-start-pos (- start shift-start)
-              vlf-end-pos (+ end shift-end))
-        (goto-char (or (byte-to-position (- pos vlf-start-pos))
-                       (point-max))))
+        (setq start (- start shift-start))
+        (goto-char (or (byte-to-position (- pos start))
+                       (byte-to-position (- pos vlf-start-pos))
+                       (point-max)))
+        (setq vlf-start-pos start
+              vlf-end-pos (+ end shift-end)))
       (set-buffer-modified-p modified)
       t))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]