vim -u NONE:set nocompatiblesome textCtrl-Fh (now the cursor is between x and t, as in | is the cursor in some tex|t)I would expect the cursor to be where I left it (and it would be there if I had hit h more than once), but instead it is after some text.
9.0 patches 1-1182
Operating system: ArchLinux (up-to-date)
Terminal: URxvt
Value of $TERM: rxvt-unicode-256color
Shell: Bash
No response
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
This happens because quite often the cursor will be on the last character not because of being moved there, but because it's moved back from after the line. Actually moving the cursor there is a bit unexpected, and there is no information about how the cursor got there.
I don't think this can be solved properly without quite a bit of work, and it would happen very infrequently. It's a minor problem as well. Thus this problem gets a low priority.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I have found where this behaviour occour in the code
it seems like a deliberate behavior, although I don't understand why
may be a solution to rem those lines ?
https://github.com/vim/vim/blob/441a7a94482f704b66253b8d08130f27b6b13736/src/ex_getln.c#L4629-L4633
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
This happens because quite often the cursor will be on the last character not because of being moved there, but because it's moved back from after the line.
But one can go from command line window's inset mode back to command line via Ctrl+C, so even with the change I suggest, one could still do what the current behavior does, ad the cost of hitting a (or equivalently A) before Ctrl+C. On the other hand, given the current behavior, if one wants to have the cursor right before the last character in command line when moving to it from command line window, one has to Ctrl+C and then reach for Left arrow (far away), or Backspace (closer), but resorting on memory in the latter case, as regards to what character was there.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
By the way, at c_CTRL-F one reads
Vim will be in Normal mode when the editor is opened, except when 'insertmode' is set.
and that is true, but if one pressed Ctrl+F while the cursor is at the end of the command line (I'd say the most frequent case, and possibly preciselyh the reason why one is moving to command line window: to be able to move across the line with normal mode movements rather than via arrow keys), one finds the cursor being in normal mode and at the past-to-last character position, which is kind of invalid; indeed, you can h to move to the last character, but l will not bring you back on that position which unreachable in normal mode.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()