Well for example one of my plugins includes bash shell emulation inside a vim buffer, it's called shellasync.vim and it's source code is at https://github.com/troydm/shellasync.vim, it uses InsertEnter to check if user went into insert mode while his cursor was on prefix of shell e.g. '$' symbol and if it does it just automaticly moves cursor on 3rd col instead. For a user of my plugin (atleast for me) this is an expected behaviour
for example open some multi line file
do
:au InsertEnter <buffer> normal! 3jl
try entering insert mode on the first line (it works)
now reopen some other multiline file and do
:au InsertEnter <buffer> normal! 3l
And it doesn't works
You mean check_cursor_col() call is to check for the line to avoid going outside of the available lines when text has changed i presume?
So what is the proposed fix?
commenting/removing this line?
curwin->w_cursor = save_cursor;
Wait, isn't check_cursor_col() called only when line number hasn't changed, and that is when cursor's position is resetted to value before event call
Thanks, works perfectly