Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

To clarify: this is the terminal's scrollback buffer vs one managed by the application in the alternate screen.

When I scroll up in nvim, it will keep the editor frame in place (that's the top bar and bottom bar showing things like open buffers, git status, the scratch buffer or whatever it's called), but the file contents will scroll by because nvim at that point has exclusive ownership of the entire screen and can do anything with it, including repainting parts of it in response to motions or a mouse scrolling (if your terminal supports emitting mouse events).

This is in contrast to the `rmcup` "normal" terminal mode where it will scroll back in the terminal's history.

The best analogue I have for that last one is to use tmux with nvim open, and have a tmux visual selection going. You can scroll up and out of nvim, and keep scrolling to whatever was executed before neovim, and when you get out of tmux visual mode it'll snap back down to the bottom of your scrollback buffer, nvim (nominally) taking up the entire pane like nothing happened; but we can probably agree that outside of a few narrow use cases, this isn't a very desirable way to manage scrolling in a terminal.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: