From 655805ce48dc2bc4f526ddbbb045ee2971cd14ec Mon Sep 17 00:00:00 2001 From: Andrey Kotlarski Date: Fri, 13 Dec 2013 02:30:29 +0200 Subject: [PATCH] Fix vlf-next-batch-from-point behaviour near end of file. --- vlf.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vlf.el b/vlf.el index 8d0eca5..ac657d6 100644 --- a/vlf.el +++ b/vlf.el @@ -392,7 +392,8 @@ When given MINIMAL flag, skip non important operations." (defun vlf-next-batch-from-point () "Display batch of file data starting from current point." (interactive) - (vlf-move-to-batch (+ vlf-start-pos (position-bytes (point)) -1)) + (let ((start (+ vlf-start-pos (position-bytes (point)) -1))) + (vlf-move-to-chunk start (+ start vlf-batch-size))) (goto-char (point-min))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;