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

Preserve cursor position on reload #969

Closed
elextr opened this issue Mar 19, 2016 · 6 comments
Closed

Preserve cursor position on reload #969

elextr opened this issue Mar 19, 2016 · 6 comments

Comments

@elextr
Copy link
Member

elextr commented Mar 19, 2016

Currently on reload the cursor moves to the start, causing a scroll to the start.

The cursor position should be saved and restored if possible (ie if the file is still longer than the position).

Even better would be for the screen position to remain the same, but I'm not sure Scintilla supports that.

My personal use-case is reloading test logs where I want the cursor to go to the previously failing test output so I can check I fixed it, but there are others as well.

@b4n
Copy link
Member

b4n commented Mar 19, 2016

Ideally a Scintilla undo would restore caret position itself. But yeah, would be nice even if only for reload.

@elextr
Copy link
Member Author

elextr commented Mar 24, 2016

Interestingly if using split-window plugin with the same file in both panes, on reload one pane goes to the start of the file and the other stays put :)

@lpaulsen93
Copy link
Contributor

Is this still an issue? If I reload a document the cursor stays where it is (only the visible area of the editor window changes slightly).

@elextr
Copy link
Member Author

elextr commented Mar 14, 2018

Hmmm, seems to work, but I can't find what fixed it, must have a bad commit message. Will close for now, can always re-open later if its still broken.

@elextr elextr closed this as completed Mar 14, 2018
@codebrainz
Copy link
Member

It was fixed in ab52956 at one point, but that was quite some time before this Issue was opened.

@elextr
Copy link
Member Author

elextr commented Mar 15, 2018

Yeah, more likely somewhere around here

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

No branches or pull requests

4 participants