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 movement sometimes fails in vim keymap #249

Closed
ethercrow opened this issue Nov 19, 2012 · 9 comments
Closed

Cursor movement sometimes fails in vim keymap #249

ethercrow opened this issue Nov 19, 2012 · 9 comments

Comments

@ethercrow
Copy link
Member

Original author: virap...@gmail.com (March 14, 2009 21:41:14)

What steps will reproduce the problem?

  1. Load a file that takes over 1 screen
  2. Go to the beginning of the file (by 'page up' / whatever)
  3. When you see the beginning, press 'page up'.
  4. Put the cursor (with arrow keys / ...) in the centre of the screen.
  5. Press 'shift+g' - cursor will skip to the last line of the current
    screen instead of EOF.

It doesn't happen if you don't press the "unneeded" 'page up'.

What version of Yi are you using?
Yi-devel - current
What version of GHC?
6.10.1

Please provide any additional information below.

Same thing happens sometimes with '/search' and after pressing 'n' -
instead of to the next occurrence, cursor skips to the end of the current
screen - but I can't figure out the exact scenario for this case.

Original issue: http://code.google.com/p/yi-editor/issues/detail?id=250

@ethercrow
Copy link
Member Author

From kball...@gmail.com on March 15, 2009 02:35:46
I see this happen with any type of movement that can go outside of the visible window. Quite irritating.

@ethercrow
Copy link
Member Author

From jeffwheeler on March 15, 2009 04:27:37
I think a related question is whether it should be possible to have the point outside
the current display. In my opinion, this should definitely be permitted, as it is in
essentially all GUI editors (e.g. gedit), and (I think) optionally in Emacs.

Doing any action other than scrolling (e.g. moving the point or deleting a letter)
should move the display to show that change, presumably by centering the point. I
very much like the behaviour in gedit and other editors, here.

@ethercrow
Copy link
Member Author

From kball...@gmail.com on March 15, 2009 06:00:00
I should point out that this bug isn't related to the vim keymap - I see it using the emacs keymap. Also, in
response to having the point outside the window, any command that changes the current point should always
scroll the window to have that point visible. I agree that we should allow the point to exist outside of the current
window, but only in GUIs that support scrolling the display without moving the point.

@ethercrow
Copy link
Member Author

From JeanPhil...@gmail.com on March 15, 2009 08:07:45
Can you explain how to reproduce with emacs keymap?
(BTW, please keep the comments on topic --use the mailing list for discussion, or
open another issue-- I find it difficult to follow which is the issue proper and
which are side comments)

@ethercrow
Copy link
Member Author

From kball...@gmail.com on March 15, 2009 16:46:34
Any command in the emacs keymap that can move the point outside of the current window has the possibility of
stopping on the edge of the window without scrolling. For example, M-g g 75 is supposed to jump to
line 75, but if line 75 is not visible, it sometimes jumps to the nearest visible line and I have to repeat the
command. Similarly with M-< and M->.

@ethercrow
Copy link
Member Author

From JeanPhil...@gmail.com on March 15, 2009 17:43:01
I don't think I have ever experienced this. Can you give move info about your config?
(FWIW this could be explained by abuse of the pointDrive attribute somewhere)

@ethercrow
Copy link
Member Author

From nicolas....@gmail.com on March 15, 2009 17:59:32
I experience this quite often (using the Vim keymap), I didn't took the time to
reproduce it.

@ethercrow
Copy link
Member Author

From kball...@gmail.com on March 15, 2009 20:38:42
I have nothing at all special about my config. I don't know how to reproduce it - it only occurs sometimes, and
immediately after it occurs, things work properly again. Basically, it feels somewhat random when it happens.

@ethercrow
Copy link
Member Author

From m.ni...@gmail.com on March 17, 2009 13:17:03
Both of these should page down, page up, then move to end of buffer. Instead, they
move to the end of the first screen.

yi --as=vi README
C-d, C-u, G

yi --as=emacs README
C-v, M-v, M->

This is definitely caused by the pointDrive attribute being set to False.

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

1 participant