diff --git a/vlfi.el b/vlfi.el index c429408..436f082 100644 --- a/vlfi.el +++ b/vlfi.el @@ -75,6 +75,7 @@ (set-buffer-modified-p nil) (buffer-disable-undo) (add-hook 'write-contents-functions 'vlfi-write) + (setq revert-buffer-function 'vlfi-revert) (make-local-variable 'vlfi-batch-size) (put 'vlfi-batch-size 'permanent-local t) (make-local-variable 'vlfi-start-pos) @@ -242,6 +243,11 @@ buffer. You can customize number of bytes displayed by customizing (vlfi-mode) (switch-to-buffer (current-buffer)))) +(defun vlfi-revert (&rest args) + "Revert current chunk. Ignore ARGS." + (ignore args) + (vlfi-move-to-chunk vlfi-start-pos vlfi-end-pos)) + ;;;###autoload (defun dired-vlfi (from-end) "In Dired, visit the file on this line in VLFI mode.