0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.0.0900: :tab options doesn't open a new tab page

Problem:    :tab options doesn't open a new tab page. (Aviany)
Solution:   Support the :tab modifier. (closes #1960)
This commit is contained in:
Bram Moolenaar
2017-08-11 17:15:09 +02:00
parent 2d33e90f81
commit ab6c8587ba
3 changed files with 12 additions and 12 deletions

View File

@@ -1,20 +1,17 @@
" These commands create the option window. " These commands create the option window.
" "
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2017 Aug 01 " Last Change: 2017 Aug 11
" If there already is an option window, jump to that one. " If there already is an option window, jump to that one.
if bufwinnr("option-window") > 0 let buf = bufnr('option-window')
let s:thiswin = winnr() if buf >= 0
while 1 let winids = win_findbuf(buf)
if @% == "option-window" if len(winids) > 0
if win_gotoid(winids[0]) == 1
finish finish
endif endif
wincmd w endif
if s:thiswin == winnr()
break
endif
endwhile
endif endif
" Make sure the '<' flag is not included in 'cpoptions', otherwise <CR> would " Make sure the '<' flag is not included in 'cpoptions', otherwise <CR> would
@@ -141,8 +138,8 @@ while exists("b:current_syntax") && b:current_syntax == "help"
endif endif
endwhile endwhile
" Open the window " Open the window. $OPTWIN_CMD is set to "tab" for ":tab options".
new option-window exe $OPTWIN_CMD . ' new option-window'
setlocal ts=15 tw=0 noro buftype=nofile setlocal ts=15 tw=0 noro buftype=nofile
" Insert help and a "set" command for each option. " Insert help and a "set" command for each option.

View File

@@ -3749,6 +3749,7 @@ ex_packadd(exarg_T *eap)
ex_options( ex_options(
exarg_T *eap UNUSED) exarg_T *eap UNUSED)
{ {
vim_setenv((char_u *)"OPTWIN_CMD", (char_u *)(cmdmod.tab ? "tab" : ""));
cmd_source((char_u *)SYS_OPTWIN_FILE, NULL); cmd_source((char_u *)SYS_OPTWIN_FILE, NULL);
} }
#endif #endif

View File

@@ -769,6 +769,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
900,
/**/ /**/
899, 899,
/**/ /**/