Thursday, January 7, 2010

screen does not scrolling when moving cursor in function

I am not very sure whether this is a bug of screen update.
OR some kind of rule for the vim, sorry i can't find this kind of rule mentioned in the help doc.

It happens when i do some kind of moving cursor action in a vim function which is used to
move the cursor position (out of screen) in another vim window.

So you can reproduce this using the script i attached.

The step is :
1. start a new vim and source the script
2. you can see that the line in another window do NOT scroll to the line could show the cursor
3. CTRL-W CTRL-W ( move the cursor into another window )
    Now the screen update to let the cursor line show.

However, when i focus to the below window and run command 
:call cursor( 1, 1 )
or
:call cursor( 99 , 1 )
The screen will update immediately to the line i set to cursor function.

Now, we can find that, the same call to cursor() in the MoveCursor() function 
will NOT update the screen. Does this a problem?
Or is there some option could preventing is ?

PS: i try to "set nolazyredraw", but it seems not work for me.


    

No comments: