mirror of
https://github.com/neovim/neovim.git
synced 2025-10-06 09:56:31 +00:00
Merge #11735 ':tabs : show # for previous tabpage'
This commit is contained in:
@@ -7037,6 +7037,10 @@ static void ex_tabs(exarg_T *eap)
|
||||
msg_start();
|
||||
msg_scroll = TRUE;
|
||||
|
||||
win_T *lastused_win = valid_tabpage(lastused_tabpage)
|
||||
? lastused_tabpage->tp_curwin
|
||||
: NULL;
|
||||
|
||||
FOR_ALL_TABS(tp) {
|
||||
if (got_int) {
|
||||
break;
|
||||
@@ -7054,7 +7058,7 @@ static void ex_tabs(exarg_T *eap)
|
||||
}
|
||||
|
||||
msg_putchar('\n');
|
||||
msg_putchar(wp == curwin ? '>' : ' ');
|
||||
msg_putchar(wp == curwin ? '>' : wp == lastused_win ? '#' : ' ');
|
||||
msg_putchar(' ');
|
||||
msg_putchar(bufIsChanged(wp->w_buffer) ? '+' : ' ');
|
||||
msg_putchar(' ');
|
||||
|
@@ -246,7 +246,7 @@ func Test_p_arg()
|
||||
call assert_equal('Tab page 1', lines[0])
|
||||
call assert_equal('> [No Name]', lines[1])
|
||||
call assert_equal('Tab page 2', lines[2])
|
||||
call assert_equal(' [No Name]', lines[3])
|
||||
call assert_equal('# [No Name]', lines[3])
|
||||
endif
|
||||
|
||||
if RunVim([], after, '-p foo bar')
|
||||
@@ -255,7 +255,7 @@ func Test_p_arg()
|
||||
call assert_equal('Tab page 1', lines[0])
|
||||
call assert_equal('> foo', lines[1])
|
||||
call assert_equal('Tab page 2', lines[2])
|
||||
call assert_equal(' bar', lines[3])
|
||||
call assert_equal('# bar', lines[3])
|
||||
endif
|
||||
|
||||
call delete('Xtestout')
|
||||
|
@@ -548,7 +548,7 @@ func Test_tabs()
|
||||
norm ixxx
|
||||
let a=split(execute(':tabs'), "\n")
|
||||
call assert_equal(['Tab page 1',
|
||||
\ ' [No Name]',
|
||||
\ '# [No Name]',
|
||||
\ 'Tab page 2',
|
||||
\ '> + tab1'], a)
|
||||
|
||||
|
Reference in New Issue
Block a user