Hirohito Higashi wrote: > Hi, Bram and list > > I reproduce on console vim 7.3.1195 on linux (fedora 17 64bit) > > How to reproduce: > 1. Prepare rc file > $ cat ~/vimrc_foo > set tabline=%!Foo() > set guioptions-=e > function! Foo() > return gettabwinvar(1, 0, 'foo') > endfunction > > 2. Start Vim and :tab new > $ vim -N -u ~/vimrc_foo --noplugin -c tabnew > > 3. Input start visual-mode command (on second tab-page) > V > > expected behavior: > Vim become Visual mode. > > Actual behavior: > Vim seems to stay in normal mode. > > > My survey results in Vim's source code: > - f_gettabwinvar() use switch_win() indirectly. (since 7.3.963) > f_gettabwinvar() > getwinvar() > switch_win() > > - switch_win() have screen-update effect when tabpage changed. > - Visual mode canceled > switch_win() > goto_tabpage_tp() > leave_tabpage() > reset_VIsual_and_resel() > end_visual_mode() > > - full redraw flag is set > switch_win() > goto_tabpage_tp() > enter_tabpage() > must_redraw = CLEAR; > > - f_gettabwinvar() get only window's of tappage's variable. > It should not need screen-update effect. > > > What do you think? > For more information, please refer to vim-jp's Issue. (in Japanese) > https://github.com/vim-jp/issues/issues/415 > > And I attached a patch. Please check this.
It's a bit tricky not to enter the tabpage. I rather keep using switch_win(), so that we have one way of temporarily using a window in another tab. We can avoid the display updating part. But we have to make sure win_valid() works, for example. I'll make a patch for that. -- If evolution theories are correct, humans will soon grow a third hand for operating the mouse. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.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 --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
