Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keep Emacs from scrolling past end of buffer

Is there anything I can add to my .emacs file to keep emacs from adding new lines when I scroll past the end of the buffer with my mouse or the scrollbar? I already have

(setq next-line-add-newlines nil)

but that seems to only be applying to when I am moving with the keyboard. I've done quite a few searches on the subject to no avail.

Any tips are greatly appreciated! Thank you.

like image 803
baker1990 Avatar asked Jan 13 '11 00:01

baker1990


2 Answers

Check the value of the the variable next-line-add-newlines in the buffers/modes that it's misbehaving. You can do so by: C-h v next-line-add-newlines (or M-x describe-variable).

It could be something in the major/minor mode that's enabling it.

like image 151
Trey Jackson Avatar answered Oct 06 '22 23:10

Trey Jackson


Have you checked whether this also happens in standard emacs (i.e. have you tested this behaviour when running emacs with --no-init-file) ?

If it doesn't, then the cause for this problem has to lie somewhere in your dotfiles.

like image 23
Gyom Avatar answered Oct 07 '22 00:10

Gyom