1
0
mirror of https://github.com/m00natic/vlfi.git synced 2025-01-18 20:10:47 +00:00

Fix position when moving to overlapping chunk.

This commit is contained in:
Andrey Kotlarski 2013-12-11 02:51:46 +02:00
parent 371c560f4b
commit c0a85cdcfe

10
vlf.el
View File

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