Merge #11735 ':tabs : show # for previous tabpage'

This commit is contained in:
Justin M. Keyes
2020-01-19 22:25:53 -08:00
committed by GitHub
4 changed files with 45 additions and 12 deletions

View File

@@ -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(' ');

View File

@@ -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')

View File

@@ -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)