Hi, Gvim opens a new tab just next to the current tab by default. Is it acceptable to open the new tab at the end of the tabline by default? Recently somebody was asking for this in the vim_use group. A patch to get this behaviour follows:
diff -r de6d730223f7 src/window.c --- a/src/window.c Fri Jul 30 13:21:50 2010 +0530 +++ b/src/window.c Fri Jul 30 21:02:20 2010 +0530 @@ -3458,6 +3458,17 @@ } else { + if (after == 0) + { + /* Put new tab page after the last tab page */ + for (tp = first_tabpage; ; tp = tp->tp_next) + { + /* cycle to the last tab */ + if (tp->tp_next == NULL) break; + } + newtp->tp_next = NULL; + tp->tp_next = newtp; + } if (after > 0) { /* Put new tab page before tab page "after". */ @@ -3465,9 +3476,9 @@ for (tp = first_tabpage; tp->tp_next != NULL && n < after; tp = tp->tp_next) ++n; + newtp->tp_next = tp->tp_next; + tp->tp_next = newtp; } - newtp->tp_next = tp->tp_next; - tp->tp_next = newtp; } win_init_size(); firstwin->w_winrow = tabline_height(); Comments/suggestions on this? /harig -- 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