Commit ca160bc4 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(View-scroll-lines-forward): If we exit, do nothing else.

parent 08f7aa3e
...@@ -331,23 +331,23 @@ No arg means whole window full, or number of lines set by \\[View-scroll-lines-f ...@@ -331,23 +331,23 @@ No arg means whole window full, or number of lines set by \\[View-scroll-lines-f
Arg is number of lines to scroll." Arg is number of lines to scroll."
(interactive "P") (interactive "P")
(if (pos-visible-in-window-p (point-max)) (if (pos-visible-in-window-p (point-max))
(view-exit)) (view-exit)
(setq lines (setq lines
(if lines (prefix-numeric-value lines) (if lines (prefix-numeric-value lines)
(view-scroll-size))) (view-scroll-size)))
; (view-last-command 'View-scroll-lines-forward lines) ;; (view-last-command 'View-scroll-lines-forward lines)
(if (>= lines (view-window-size)) (if (>= lines (view-window-size))
(scroll-up nil) (scroll-up nil)
(if (>= (- lines) (view-window-size)) (if (>= (- lines) (view-window-size))
(scroll-down nil) (scroll-down nil)
(scroll-up lines))) (scroll-up lines)))
(cond ((pos-visible-in-window-p (point-max)) (cond ((pos-visible-in-window-p (point-max))
(goto-char (point-max)) (goto-char (point-max))
(recenter -1) (recenter -1)
(message (substitute-command-keys (message (substitute-command-keys
"End. Type \\[view-exit] to quit viewing.")))) "End. Type \\[view-exit] to quit viewing."))))
(move-to-window-line -1) (move-to-window-line -1)
(beginning-of-line)) (beginning-of-line)))
(defun View-scroll-lines-forward-set-scroll-size (&optional lines) (defun View-scroll-lines-forward-set-scroll-size (&optional lines)
"Scroll forward LINES lines in View mode, setting the \"scroll size\". "Scroll forward LINES lines in View mode, setting the \"scroll size\".
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment