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

Should cache cursor column number and not update that cache when only scrolling up or down (see example) #1135

Open
collinalexbell opened this issue Jan 7, 2020 · 0 comments

Comments

@collinalexbell
Copy link

collinalexbell commented Jan 7, 2020

For example, take the following text

aaaaaa
bbb

Imagine the cursor is over the last a in the first line and then I move the cursor down. It will then be on the last b in the second line. If I move the cursor back up to the 1st line, it should remember that I was at the last a and jump back to it (this is how it would work in vim). Instead it goes to the 3rd a.

Essentially, every time the cursor moves left or right, the column # gets saved. If the cursor moves down or up to a line that has less columns than that saved column number, it simply goes to the last column available, but the cache still remains at the larger number. That way, if the cursor moves back up to a line that has columns >= cached_column, it will jump back to the cache column.

Sorry if this is confusing. Just try the example I posted in both vim and atom to see what I am talking about.

@collinalexbell collinalexbell changed the title Should remember column number if scroll down to line that has less characters than that # Should cache cursor column number and not update that cache when only scrolling up or down (see example) Jan 7, 2020
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

1 participant