Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursor should never move when scrolling. #4970

Closed
amichail opened this issue Feb 5, 2016 · 6 comments
Closed

Cursor should never move when scrolling. #4970

amichail opened this issue Feb 5, 2016 · 6 comments

Comments

@amichail
Copy link

amichail commented Feb 5, 2016

Currently, it starts moving when it gets close to the top or bottom margin.

This makes relative line numbering mode less useful.

@JohnDDuncanIII
Copy link

I use this (with the scroll-restore package from the ELPA) to fix that problem

;; scrollers - scroll buffer not point
(global-set-key "\M-n" "\C-u1\C-v")
(global-set-key "\M-p" "\C-u1\M-v")

;; Restore the cursor when you scroll past it on the buffer
(require 'scroll-restore)
(scroll-restore-mode 1)
;; Allow scroll-restore to modify the cursor face
(setq scroll-restore-handle-cursor t)
;; Make the cursor invisible while POINT is off-screen
;;(setq scroll-restore-cursor-type nil)
;; Jump back to the original cursor position after scrolling
(setq scroll-restore-jump-back t)
;; Toggle scroll-restore-mode with the Scroll Lock key
(global-set-key (kbd "<Scroll_Lock>") 'scroll-restore-mode)

@amichail
Copy link
Author

amichail commented Feb 5, 2016

Shouldn't this be the default behaviour though?

@JohnDDuncanIII
Copy link

In my opinion, yes! That scroll-restore package is buggy too. I don't think there is a clean way to let the cursor stay in its position outside of the buffer without hacks such as scroll-restore.

@sooheon
Copy link

sooheon commented Feb 22, 2016

@JohnDDuncanIII Thanks for the scroll-restore package, it improves the behavior at top of file. Still, scrolling down to the bottom is broken, because once the last line of file is in view, additional calls to evil-scroll-down or evil-scroll-page-down will do nothing, unlike in vim, where cursor will always travel to the end of the document. Do you have this behavior as well? Do you just live with it?

@darfink
Copy link

darfink commented Feb 23, 2016

@sooheon I believe you are referring to this bug.

@d12frosted
Copy link
Collaborator

@sooheon that upstream bug was resolved. Do you still experience bugs from proposed solution?

This issue is old, so I am closing it. Let me know if you wish to reopen it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants