On Fri, 28 Apr 2006, Eric Arnold wrote:

On 4/28/06, Eric Arnold <[EMAIL PROTECTED]> wrote:
The end of the visual selection as gotten by    `>   seems to depend
on whether the cursor was  between the end_col - 1, and end_col,  or
between end_col, and end_col + 1.  The GUI gvim seems to have the
notion of the the cursor being between characters in visual mode.

`> sometimes lands you on the character *after* the last col of the
visual selection.

So, the question is, how do I get the real last column of the Visual selection?


Actually, this seems be inconsistent mostly when you start a
visual-block selections from different corners.


It works as expected for me. For example,

  1. Start :new buffer.
  2. From Normal mode, type "iab".
  3. Hit <Enter>.
  4. Type "cd", and hit <Esc>. Then do "gg0". You should have:

           ab
           cd

     with the Normal cursor on "a".

  5. Start visual block with <C-v>, and hit "jl". Press <Esc>.

Now, from Insert mode, if you did

  6. <C-o> followed by `>

the Insert cursor will be between "c" and "d". If, instead, you hit
"j2l" in step 5, then (after step 6) the Insert cursor will appear after
"d".

Remember, visual modes are able to highlight _past_ the end-of-line,
unlike the Normal mode cursor.

Please provide an example if you still see a problem.

HTH.
--
Gerald

Reply via email to