Friday, July 16, 2010

Cursor position insert mode

Hello,

in my script which is called while the user is in insert mode, I'd like
to detect if the cursor is after the last character on the current line.

I tried col(".") but it returns the same number regardless of whether
the insert-mode-cursor is before or after the last character on the line.

If cursor on the first column => col(".") == 1

Then, when moving right, it increases of course with each step.

But the step from right before the last character until behind the last
character does *not* increase col(".") anymore.
Is this a bug or a feature?

Any ideas?

Thanks!
MD.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: