On Mon, Jan 12, 2015 at 9:52 AM, Enno <enno.na...@gmail.com> wrote: > Le lundi 12 janvier 2015 14:41:00 UTC+1, Bram Moolenaar a écrit : > > Enno Nagel wrote: > > > > > The command > > > > > > 0wincmd w > > > > > > throws an error in the latest Vim version: > > > > > > E16: Invalid range: 0wincmd w > > > > > > Before, it simply stayed in the same window. > > > Is this a new feature or a bug? > > > > There is no window with the number zero, so the error is correct. > > > > Is this breaking some plugin? > > > > -- > > hundred-and-one symptoms of being an internet addict: > > 74. Your most erotic dreams are about cybersex > > > > /// Bram Moolenaar -- b...@moolenaar.net -- 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 > /// > > Well I have a plugin FastFold https://github.com/Konfekt/FastFold that > uses a WinDo command that restores the current and alternate window by > > let curaltwin = winnr('#') > let currwin=winnr() > execute 'windo ' . a:command > execute curaltwin . 'wincmd w' > execute currwin . 'wincmd w' > > This used to work fine even if there was no alternate window before, but > now there appear issue (https://github.com/Konfekt/FastFold/issues/11 and > https://github.com/Konfekt/FastFold/issues/12) about > > :0wincmd w > > throwing an error. > > Perhaps it used to be that > > winnr('#') > > returned the current window number if there is no alternate window. > > > When I use "gt" to switch tabs (or click on a different tab) the TagBar plugin (http://vim.sourceforge.net/script.php?script_id=3465) reports this error:
Error detected while processing function <SNR>99_QuitIfOnlyWindow..<SNR>99_goto_win: line 8: E16: Invalid range: 0wincmd w David -- -- 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 vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.