Hi tyru!
On Mi, 11 Aug 2010, tyru wrote:
> > ------- code -------
> > function! MyStatusline()
> > let pos = getpos('.')
> > try
> > normal! 0
> > return "blah blah"
> > finally
> > call setpos('.', pos)
> > endtry
> > endfunction
> >
> > let &statusline = '%{MyStatusline()}'
> > ------- code -------
>
> Regardless of :finally, below code also causes this problem.
>
> ------- code -------
> function! MyStatusline()
> let pos = getpos('.')
> normal! 0
> call setpos('.', pos)
> return "blah blah"
> endfunction
>
> let &statusline = '%{MyStatusline()}'
> ------- code -------
As a workaround, use winsaveview()/winrestview()
regards,
Christian
--
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