0

Is it possible to move point to the end of a buffer without reorienting the text around that line? This seems to be the default behaviour of goto-char. My goal is to correct a minor annoyance which places the cursor at the second last line when I press "L". I wrote a custom function to do this properly but now when I move the point to the last line the screen scrolls down half a page and it becomes the center of the buffer.

(defun cf-last-line (count) (interactive "p")
    (let ((max (truncate (window-screen-lines))))
    (move-to-window-line max)
    (line-move (* -1 (1- count)) t t)
    (beginning-of-line)))

Edit: It turns out my problem is related to the fact that the GUI shows partial lines (which may appear to be fully exposed but upon closer inspection lie just below the status bus). I suppose my question then becomes whether or not it is possible to have the point lie on such a partial line (though I suspect this is unlikely) without moving it to the center and if not whether it is possible to instead prevent the X11 frame from showing partial lines at the bottom of the window.

Drew
  • 29,895
  • 7
  • 74
  • 104
curious
  • 133
  • 7

1 Answers1

0

Solution as described by lawlist:

(setq scroll-conservatively 101) 
(setq make-cursor-line-fully-visible nil)
songyuanyao
  • 169,198
  • 16
  • 310
  • 405
curious
  • 133
  • 7