mirror of
https://github.com/m00natic/vlfi.git
synced 2025-01-18 03:55:31 +00:00
Fix whole file reload in read-only buffer on vlf-mode exit.
This commit is contained in:
parent
d1a6800b5b
commit
1c961f45b2
10
vlf.el
10
vlf.el
@ -140,14 +140,16 @@ values are: `write', `ediff', `occur', `search', `goto-line'."
|
||||
(if (consp buffer-undo-list)
|
||||
(setq buffer-undo-list nil))
|
||||
(vlf-with-undo-disabled
|
||||
(insert-file-contents-literally buffer-file-name
|
||||
t nil nil t)
|
||||
(hexlify-buffer))
|
||||
(let ((inhibit-read-only t))
|
||||
(insert-file-contents-literally buffer-file-name
|
||||
t nil nil t)
|
||||
(hexlify-buffer)))
|
||||
(set-buffer-modified-p nil)
|
||||
(goto-char (point-min))
|
||||
(forward-line line)
|
||||
(forward-char pos))
|
||||
(let ((pos (+ vlf-start-pos (position-bytes (point)))))
|
||||
(let ((pos (+ vlf-start-pos (position-bytes (point))))
|
||||
(inhibit-read-only t))
|
||||
(vlf-with-undo-disabled
|
||||
(insert-file-contents buffer-file-name t nil nil t))
|
||||
(goto-char (byte-to-position pos)))))
|
||||
|
Loading…
Reference in New Issue
Block a user