comparison src/ex_docmd.c @ 14155:da09e29e59d9 v8.1.0095

patch 8.1.0095: dialog for ":browse tabnew" says "new window" commit https://github.com/vim/vim/commit/39902a06d92750c203d86c921b9d69995f949d97 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jun 21 22:10:08 2018 +0200 patch 8.1.0095: dialog for ":browse tabnew" says "new window" Problem: Dialog for ":browse tabnew" says "new window". Solution: Use "new tab page". (closes https://github.com/vim/vim/issues/3053)
author Christian Brabandt <cb@256bit.org>
date Thu, 21 Jun 2018 22:15:06 +0200
parents a94bc6a7b29e
children 7346b2ea80d8
comparison
equal deleted inserted replaced
14154:1d9aa3fd6aa3 14155:da09e29e59d9
8198 char_u *fname = NULL; 8198 char_u *fname = NULL;
8199 #endif 8199 #endif
8200 #ifdef FEAT_BROWSE 8200 #ifdef FEAT_BROWSE
8201 int browse_flag = cmdmod.browse; 8201 int browse_flag = cmdmod.browse;
8202 #endif 8202 #endif
8203 int use_tab = eap->cmdidx == CMD_tabedit
8204 || eap->cmdidx == CMD_tabfind
8205 || eap->cmdidx == CMD_tabnew;
8203 8206
8204 #ifdef FEAT_GUI 8207 #ifdef FEAT_GUI
8205 need_mouse_correct = TRUE; 8208 need_mouse_correct = TRUE;
8206 #endif 8209 #endif
8207 8210
8246 if (*eap->arg == NUL || !mch_isdir(eap->arg)) 8249 if (*eap->arg == NUL || !mch_isdir(eap->arg))
8247 eap->arg = (char_u *)"."; 8250 eap->arg = (char_u *)".";
8248 } 8251 }
8249 else 8252 else
8250 { 8253 {
8251 fname = do_browse(0, (char_u *)_("Edit File in new window"), 8254 fname = do_browse(0, (char_u *)(use_tab
8255 ? _("Edit File in new tab page")
8256 : _("Edit File in new window")),
8252 eap->arg, NULL, NULL, NULL, curbuf); 8257 eap->arg, NULL, NULL, NULL, curbuf);
8253 if (fname == NULL) 8258 if (fname == NULL)
8254 goto theend; 8259 goto theend;
8255 eap->arg = fname; 8260 eap->arg = fname;
8256 } 8261 }
8259 #endif 8264 #endif
8260 8265
8261 /* 8266 /*
8262 * Either open new tab page or split the window. 8267 * Either open new tab page or split the window.
8263 */ 8268 */
8264 if (eap->cmdidx == CMD_tabedit 8269 if (use_tab)
8265 || eap->cmdidx == CMD_tabfind
8266 || eap->cmdidx == CMD_tabnew)
8267 { 8270 {
8268 if (win_new_tabpage(cmdmod.tab != 0 ? cmdmod.tab 8271 if (win_new_tabpage(cmdmod.tab != 0 ? cmdmod.tab
8269 : eap->addr_count == 0 ? 0 8272 : eap->addr_count == 0 ? 0
8270 : (int)eap->line2 + 1) != FAIL) 8273 : (int)eap->line2 + 1) != FAIL)
8271 { 8274 {