Tyru wrote:

> ------- code -------
> function! MyStatusline()
>     let pos = getpos('.')
>     try
>         normal! 0
>         return "blah blah"
>     finally
>         call setpos('.', pos)
>     endtry
> endfunction
> 
> let &statusline = '%{MyStatusline()}'
> ------- code -------
> 
> :source this script and "j", "k"  moves cursor
> to downward/upward but col is 1.
> 
> I also tested "call cursor(line(.), 1)" instead of "normal! 0",
> but cursor pos was restored expectedly.

I can reproduce it.  No obvious way to fix this, I'll put it in the todo
list.

-- 
CVS sux, men don't like commitment

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
You received this message from the "vim_dev" 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

Raspunde prin e-mail lui