Mercurial > vim
comparison src/ex_docmd.c @ 685:d7e33248b9c8 v7.0206
updated for version 7.0206
author | vimboss |
---|---|
date | Fri, 24 Feb 2006 23:53:04 +0000 |
parents | f1b013312711 |
children | 0e922220d322 |
comparison
equal
deleted
inserted
replaced
684:a8caf7dd853d | 685:d7e33248b9c8 |
---|---|
154 static void ex_resize __ARGS((exarg_T *eap)); | 154 static void ex_resize __ARGS((exarg_T *eap)); |
155 static void ex_stag __ARGS((exarg_T *eap)); | 155 static void ex_stag __ARGS((exarg_T *eap)); |
156 static void ex_tabclose __ARGS((exarg_T *eap)); | 156 static void ex_tabclose __ARGS((exarg_T *eap)); |
157 static void ex_tabonly __ARGS((exarg_T *eap)); | 157 static void ex_tabonly __ARGS((exarg_T *eap)); |
158 static void ex_tabnext __ARGS((exarg_T *eap)); | 158 static void ex_tabnext __ARGS((exarg_T *eap)); |
159 static void ex_tabprevious __ARGS((exarg_T *eap)); | |
160 static void ex_tabmove __ARGS((exarg_T *eap)); | 159 static void ex_tabmove __ARGS((exarg_T *eap)); |
161 static void ex_tabs __ARGS((exarg_T *eap)); | 160 static void ex_tabs __ARGS((exarg_T *eap)); |
162 #else | 161 #else |
163 # define ex_close ex_ni | 162 # define ex_close ex_ni |
164 # define ex_only ex_ni | 163 # define ex_only ex_ni |
165 # define ex_all ex_ni | 164 # define ex_all ex_ni |
166 # define ex_resize ex_ni | 165 # define ex_resize ex_ni |
167 # define ex_splitview ex_ni | 166 # define ex_splitview ex_ni |
168 # define ex_stag ex_ni | 167 # define ex_stag ex_ni |
169 # define ex_tabnext ex_ni | 168 # define ex_tabnext ex_ni |
170 # define ex_tabprevious ex_ni | |
171 # define ex_tabmove ex_ni | 169 # define ex_tabmove ex_ni |
172 # define ex_tabs ex_ni | 170 # define ex_tabs ex_ni |
173 # define ex_tabclose ex_ni | 171 # define ex_tabclose ex_ni |
174 # define ex_tabonly ex_ni | 172 # define ex_tabonly ex_ni |
175 #endif | 173 #endif |
1863 continue; | 1861 continue; |
1864 | 1862 |
1865 case 't': if (checkforcmd(&p, "tab", 3)) | 1863 case 't': if (checkforcmd(&p, "tab", 3)) |
1866 { | 1864 { |
1867 #ifdef FEAT_WINDOWS | 1865 #ifdef FEAT_WINDOWS |
1868 tabpage_T *tp; | |
1869 | |
1870 if (vim_isdigit(*ea.cmd)) | 1866 if (vim_isdigit(*ea.cmd)) |
1871 cmdmod.tab = atoi((char *)ea.cmd) + 1; | 1867 cmdmod.tab = atoi((char *)ea.cmd) + 1; |
1872 else | 1868 else |
1873 { | 1869 cmdmod.tab = tabpage_index(curtab) + 1; |
1874 cmdmod.tab = 2; | |
1875 for (tp = first_tabpage; tp != curtab; | |
1876 tp = tp->tp_next) | |
1877 ++cmdmod.tab; | |
1878 } | |
1879 ea.cmd = p; | 1870 ea.cmd = p; |
1880 #endif | 1871 #endif |
1881 continue; | 1872 continue; |
1882 } | 1873 } |
1883 if (!checkforcmd(&ea.cmd, "topleft", 2)) | 1874 if (!checkforcmd(&ea.cmd, "topleft", 2)) |
6240 static void | 6231 static void |
6241 ex_tabclose(eap) | 6232 ex_tabclose(eap) |
6242 exarg_T *eap; | 6233 exarg_T *eap; |
6243 { | 6234 { |
6244 tabpage_T *tp; | 6235 tabpage_T *tp; |
6245 int h = tabpageline_height(); | 6236 int h = tabline_height(); |
6246 | 6237 |
6247 # ifdef FEAT_CMDWIN | 6238 # ifdef FEAT_CMDWIN |
6248 if (cmdwin_type != 0) | 6239 if (cmdwin_type != 0) |
6249 cmdwin_result = K_IGNORE; | 6240 cmdwin_result = K_IGNORE; |
6250 else | 6241 else |
6269 } | 6260 } |
6270 if (!text_locked()) | 6261 if (!text_locked()) |
6271 tabpage_close(eap->forceit); | 6262 tabpage_close(eap->forceit); |
6272 } | 6263 } |
6273 | 6264 |
6274 if (h != tabpageline_height()) | 6265 if (h != tabline_height()) |
6275 shell_new_rows(); | 6266 shell_new_rows(); |
6276 } | 6267 } |
6277 | 6268 |
6278 /* | 6269 /* |
6279 * ":tabonly": close all tab pages except the current one | 6270 * ":tabonly": close all tab pages except the current one |
6282 ex_tabonly(eap) | 6273 ex_tabonly(eap) |
6283 exarg_T *eap; | 6274 exarg_T *eap; |
6284 { | 6275 { |
6285 tabpage_T *tp; | 6276 tabpage_T *tp; |
6286 int done; | 6277 int done; |
6287 int h = tabpageline_height(); | 6278 int h = tabline_height(); |
6288 | 6279 |
6289 # ifdef FEAT_CMDWIN | 6280 # ifdef FEAT_CMDWIN |
6290 if (cmdwin_type != 0) | 6281 if (cmdwin_type != 0) |
6291 cmdwin_result = K_IGNORE; | 6282 cmdwin_result = K_IGNORE; |
6292 else | 6283 else |
6312 if (first_tabpage->tp_next == NULL) | 6303 if (first_tabpage->tp_next == NULL) |
6313 break; | 6304 break; |
6314 } | 6305 } |
6315 } | 6306 } |
6316 | 6307 |
6317 if (h != tabpageline_height()) | 6308 if (h != tabline_height()) |
6318 shell_new_rows(); | 6309 shell_new_rows(); |
6319 } | 6310 } |
6320 | 6311 |
6321 /* | 6312 /* |
6322 * Close the current tab page. | 6313 * Close the current tab page. |
7040 */ | 7031 */ |
7041 static void | 7032 static void |
7042 ex_tabnext(eap) | 7033 ex_tabnext(eap) |
7043 exarg_T *eap; | 7034 exarg_T *eap; |
7044 { | 7035 { |
7045 goto_tabpage(eap->addr_count == 0 ? 0 : (int)eap->line2); | 7036 switch (eap->cmdidx) |
7046 } | 7037 { |
7047 | 7038 case CMD_tabfirst: |
7048 /* | 7039 case CMD_tabrewind: |
7049 * :tabprevious and :tabNext command | 7040 goto_tabpage(1); |
7050 */ | 7041 break; |
7051 static void | 7042 case CMD_tablast: |
7052 ex_tabprevious(eap) | 7043 goto_tabpage(9999); |
7053 exarg_T *eap; | 7044 break; |
7054 { | 7045 case CMD_tabprevious: |
7055 goto_tabpage(eap->addr_count == 0 ? -1 : -(int)eap->line2); | 7046 case CMD_tabNext: |
7047 goto_tabpage(eap->addr_count == 0 ? -1 : -(int)eap->line2); | |
7048 break; | |
7049 default: /* CMD_tabnext */ | |
7050 goto_tabpage(eap->addr_count == 0 ? 0 : (int)eap->line2); | |
7051 break; | |
7052 } | |
7056 } | 7053 } |
7057 | 7054 |
7058 /* | 7055 /* |
7059 * :tabmove command | 7056 * :tabmove command |
7060 */ | 7057 */ |