diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-02-24 23:53:04 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-02-24 23:53:04 +0000 |
commit | 32466aa2e9c45ab355dbaf99a9eedf334bc2e29f (patch) | |
tree | 1644d959a04f9f8c6ea5a8fe3c79f037c6915559 /src/ex_cmds2.c | |
parent | 2a3f7eeebfa05a33cc1d8fbba66a3dff976e8dd7 (diff) | |
download | vim-git-32466aa2e9c45ab355dbaf99a9eedf334bc2e29f.tar.gz |
updated for version 7.0206v7.0206
Diffstat (limited to 'src/ex_cmds2.c')
-rw-r--r-- | src/ex_cmds2.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 416fd3e35..0d7188ac1 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -2155,7 +2155,7 @@ ex_argdelete(eap) } /* - * ":argdo", ":windo", ":bufdo" + * ":argdo", ":windo", ":bufdo", ":tabdo" */ void ex_listdo(eap) @@ -2163,7 +2163,8 @@ ex_listdo(eap) { int i; #ifdef FEAT_WINDOWS - win_T *win; + win_T *wp; + tabpage_T *tp; #endif buf_T *buf; int next_fnum = 0; @@ -2188,13 +2189,15 @@ ex_listdo(eap) #endif if (eap->cmdidx == CMD_windo + || eap->cmdidx == CMD_tabdo || P_HID(curbuf) || !check_changed(curbuf, TRUE, FALSE, eap->forceit, FALSE)) { /* start at the first argument/window/buffer */ i = 0; #ifdef FEAT_WINDOWS - win = firstwin; + wp = firstwin; + tp = first_tabpage; #endif /* set pcmark now */ if (eap->cmdidx == CMD_bufdo) @@ -2229,11 +2232,19 @@ ex_listdo(eap) #ifdef FEAT_WINDOWS else if (eap->cmdidx == CMD_windo) { - /* go to window "win" */ - if (!win_valid(win)) + /* go to window "wp" */ + if (!win_valid(wp)) + break; + win_goto(wp); + wp = curwin->w_next; + } + else if (eap->cmdidx == CMD_tabdo) + { + /* go to window "tp" */ + if (!valid_tabpage(tp)) break; - win_goto(win); - win = curwin->w_next; + goto_tabpage_tp(tp); + tp = tp->tp_next; } #endif else if (eap->cmdidx == CMD_bufdo) |