mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 9.0.1195: restoring KeyTyped when building statusline not tested
Problem: Restoring KeyTyped when building statusline not tested. Solution: Add a test. Clean up and fix other tests. (closes #11815)
This commit is contained in:
@@ -2043,6 +2043,6 @@ EXTERN int skip_win_fix_scroll INIT(= FALSE);
|
|||||||
// Skip update_topline() call while executing win_fix_scroll().
|
// Skip update_topline() call while executing win_fix_scroll().
|
||||||
EXTERN int skip_update_topline INIT(= FALSE);
|
EXTERN int skip_update_topline INIT(= FALSE);
|
||||||
|
|
||||||
// 'showcmd' buffer shared between normal.c and statusline.c
|
// 'showcmd' buffer shared between normal.c and statusline code
|
||||||
#define SHOWCMD_BUFLEN (SHOWCMD_COLS + 1 + 30)
|
#define SHOWCMD_BUFLEN (SHOWCMD_COLS + 1 + 30)
|
||||||
EXTERN char_u showcmd_buf[SHOWCMD_BUFLEN];
|
EXTERN char_u showcmd_buf[SHOWCMD_BUFLEN];
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
|a+0&#e0e0e08| +0&#ffffff0@73
|
|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |a|-@59
|
||||||
|b+0&#e0e0e08| +0&#ffffff0@73
|
>c+0#0000000#ffffff0| @73
|
||||||
|c+0&#e0e0e08> +0&#ffffff0@73
|
|
||||||
|~+0#4040ff13&| @73
|
|~+0#4040ff13&| @73
|
||||||
|3+3#0000000&|x|2| @71
|
|~| @73
|
||||||
|-+2&&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@56
|
|g+3#0000000&| @73
|
||||||
|
| +0&&@74
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
|a+0&#ffffff0| @73
|
>a+0&#ffffff0| @73
|
||||||
|b| @73
|
|b| @73
|
||||||
>c| @73
|
|c| @73
|
||||||
|~+0#4040ff13&| @73
|
|~+0#4040ff13&| @73
|
||||||
|1+3#0000000&|2|3|4| @70
|
| +3#0000000&@74
|
||||||
| +0&&@74
|
| +0&&@74
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
|a+0&#ffffff0| @73
|
|a+0&#e0e0e08| +0&#ffffff0@73
|
||||||
|b| @73
|
|b+0&#e0e0e08| +0&#ffffff0@73
|
||||||
>c| @73
|
|c+0&#e0e0e08> +0&#ffffff0@73
|
||||||
|~+0#4040ff13&| @73
|
|~+0#4040ff13&| @73
|
||||||
|[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @32|1|2|3|4| @6|3|,|1| @11|A|l@1
|
|3+3#0000000&|x|2| @71
|
||||||
|:+0&&| @73
|
|-+2&&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@56
|
||||||
|
6
src/testdir/dumps/Test_statusline_showcmd_4.dump
Normal file
6
src/testdir/dumps/Test_statusline_showcmd_4.dump
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
|a+0&#ffffff0| @73
|
||||||
|
|b| @73
|
||||||
|
>c| @73
|
||||||
|
|~+0#4040ff13&| @73
|
||||||
|
|1+3#0000000&|2|3|4| @70
|
||||||
|
| +0&&@74
|
6
src/testdir/dumps/Test_statusline_showcmd_5.dump
Normal file
6
src/testdir/dumps/Test_statusline_showcmd_5.dump
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
|a+0&#ffffff0| @73
|
||||||
|
|b| @73
|
||||||
|
>c| @73
|
||||||
|
|~+0#4040ff13&| @73
|
||||||
|
|[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @32|1|2|3|4| @6|3|,|1| @11|A|l@1
|
||||||
|
|:+0&&| @73
|
@@ -1,6 +1,6 @@
|
|||||||
| +2&#ffffff0|+| |[|N|o| |N|a|m|e|]| | +1&&@51|3+8#0000001#e0e0e08|x|2| +1#0000000#ffffff0@6
|
|g+1&#ffffff0| @73
|
||||||
|a+0&#e0e0e08| +0&#ffffff0@73
|
|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |a|-@59
|
||||||
|b+0&#e0e0e08| +0&#ffffff0@73
|
>c+0#0000000#ffffff0| @73
|
||||||
|c+0&#e0e0e08> +0&#ffffff0@73
|
|
||||||
|~+0#4040ff13&| @73
|
|~+0#4040ff13&| @73
|
||||||
|-+2#0000000&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@38|3|,|2| @10|A|l@1|
|
|~| @73
|
||||||
|
| +0#0000000&@56|3|,|1| @10|A|l@1|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
| +2&#ffffff0|+| |[|N|o| |N|a|m|e|]| | +1&&@51|1+8#0000001#e0e0e08|2|3|4| +1#0000000#ffffff0@5
|
| +1&#ffffff0@74
|
||||||
|a+0&&| @73
|
>a+0&&| @73
|
||||||
|b| @73
|
|b| @73
|
||||||
>c| @73
|
|c| @73
|
||||||
|~+0#4040ff13&| @73
|
|~+0#4040ff13&| @73
|
||||||
| +0#0000000&@56|3|,|1| @10|A|l@1|
|
| +0#0000000&@56|1|,|1| @10|A|l@1|
|
||||||
|
6
src/testdir/dumps/Test_tabline_showcmd_3.dump
Normal file
6
src/testdir/dumps/Test_tabline_showcmd_3.dump
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
|3+1&#ffffff0|x|2| @71
|
||||||
|
|a+0&#e0e0e08| +0&#ffffff0@73
|
||||||
|
|b+0&#e0e0e08| +0&#ffffff0@73
|
||||||
|
|c+0&#e0e0e08> +0&#ffffff0@73
|
||||||
|
|~+0#4040ff13&| @73
|
||||||
|
|-+2#0000000&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@38|3|,|2| @10|A|l@1|
|
6
src/testdir/dumps/Test_tabline_showcmd_4.dump
Normal file
6
src/testdir/dumps/Test_tabline_showcmd_4.dump
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
|1+1&#ffffff0|2|3|4| @70
|
||||||
|
|a+0&&| @73
|
||||||
|
|b| @73
|
||||||
|
>c| @73
|
||||||
|
|~+0#4040ff13&| @73
|
||||||
|
| +0#0000000&@56|3|,|1| @10|A|l@1|
|
@@ -569,22 +569,41 @@ func Test_statusline_showcmd()
|
|||||||
CheckScreendump
|
CheckScreendump
|
||||||
|
|
||||||
let lines =<< trim END
|
let lines =<< trim END
|
||||||
|
func MyStatusLine()
|
||||||
|
return '%S'
|
||||||
|
endfunc
|
||||||
|
|
||||||
set laststatus=2
|
set laststatus=2
|
||||||
set statusline=%S
|
set statusline=%!MyStatusLine()
|
||||||
set showcmdloc=statusline
|
set showcmdloc=statusline
|
||||||
call setline(1, ['a', 'b', 'c'])
|
call setline(1, ['a', 'b', 'c'])
|
||||||
|
set foldopen+=jump
|
||||||
|
1,2fold
|
||||||
|
3
|
||||||
END
|
END
|
||||||
call writefile(lines, 'XTest_statusline', 'D')
|
call writefile(lines, 'XTest_statusline', 'D')
|
||||||
|
|
||||||
let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 6})
|
let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 6})
|
||||||
call feedkeys("\<C-V>Gl", "xt")
|
|
||||||
|
call term_sendkeys(buf, "g")
|
||||||
call VerifyScreenDump(buf, 'Test_statusline_showcmd_1', {})
|
call VerifyScreenDump(buf, 'Test_statusline_showcmd_1', {})
|
||||||
|
|
||||||
call feedkeys("\<Esc>1234", "xt")
|
" typing "gg" should open the fold
|
||||||
|
call term_sendkeys(buf, "g")
|
||||||
call VerifyScreenDump(buf, 'Test_statusline_showcmd_2', {})
|
call VerifyScreenDump(buf, 'Test_statusline_showcmd_2', {})
|
||||||
|
|
||||||
call feedkeys("\<Esc>:set statusline=\<CR>:\<CR>1234", "xt")
|
call term_sendkeys(buf, "\<C-V>Gl")
|
||||||
call VerifyScreenDump(buf, 'Test_statusline_showcmd_3', {})
|
call VerifyScreenDump(buf, 'Test_statusline_showcmd_3', {})
|
||||||
|
|
||||||
|
call term_sendkeys(buf, "\<Esc>1234")
|
||||||
|
call VerifyScreenDump(buf, 'Test_statusline_showcmd_4', {})
|
||||||
|
|
||||||
|
call term_sendkeys(buf, "\<Esc>:set statusline=\<CR>")
|
||||||
|
call term_sendkeys(buf, ":\<CR>")
|
||||||
|
call term_sendkeys(buf, "1234")
|
||||||
|
call VerifyScreenDump(buf, 'Test_statusline_showcmd_5', {})
|
||||||
|
|
||||||
|
call StopVimInTerminal(buf)
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@@ -165,19 +165,41 @@ func Test_tabline_showcmd()
|
|||||||
CheckScreendump
|
CheckScreendump
|
||||||
|
|
||||||
let lines =<< trim END
|
let lines =<< trim END
|
||||||
|
func MyTabLine()
|
||||||
|
return '%S'
|
||||||
|
endfunc
|
||||||
|
|
||||||
set showtabline=2
|
set showtabline=2
|
||||||
|
set tabline=%!MyTabLine()
|
||||||
set showcmdloc=tabline
|
set showcmdloc=tabline
|
||||||
call setline(1, ['a', 'b', 'c'])
|
call setline(1, ['a', 'b', 'c'])
|
||||||
|
set foldopen+=jump
|
||||||
|
1,2fold
|
||||||
|
3
|
||||||
END
|
END
|
||||||
call writefile(lines, 'XTest_tabline', 'D')
|
call writefile(lines, 'XTest_tabline', 'D')
|
||||||
|
|
||||||
let buf = RunVimInTerminal('-S XTest_tabline', {'rows': 6})
|
let buf = RunVimInTerminal('-S XTest_tabline', {'rows': 6})
|
||||||
|
|
||||||
call feedkeys("\<C-V>Gl", "xt")
|
call term_sendkeys(buf, "g")
|
||||||
call VerifyScreenDump(buf, 'Test_tabline_showcmd_1', {})
|
call VerifyScreenDump(buf, 'Test_tabline_showcmd_1', {})
|
||||||
|
|
||||||
call feedkeys("\<Esc>1234", "xt")
|
" typing "gg" should open the fold
|
||||||
|
call term_sendkeys(buf, "g")
|
||||||
call VerifyScreenDump(buf, 'Test_tabline_showcmd_2', {})
|
call VerifyScreenDump(buf, 'Test_tabline_showcmd_2', {})
|
||||||
|
|
||||||
|
call term_sendkeys(buf, "\<C-V>Gl")
|
||||||
|
call VerifyScreenDump(buf, 'Test_tabline_showcmd_3', {})
|
||||||
|
|
||||||
|
call term_sendkeys(buf, "\<Esc>1234")
|
||||||
|
call VerifyScreenDump(buf, 'Test_tabline_showcmd_4', {})
|
||||||
|
|
||||||
|
call term_sendkeys(buf, "\<Esc>:set tabline=\<CR>")
|
||||||
|
call term_sendkeys(buf, ":\<CR>")
|
||||||
|
call term_sendkeys(buf, "1234")
|
||||||
|
call VerifyScreenDump(buf, 'Test_tabline_showcmd_5', {})
|
||||||
|
|
||||||
|
call StopVimInTerminal(buf)
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@@ -1861,6 +1861,8 @@ function Test_splitkeep_callback()
|
|||||||
|
|
||||||
call term_sendkeys(buf, ":quit\<CR>Gt")
|
call term_sendkeys(buf, ":quit\<CR>Gt")
|
||||||
call VerifyScreenDump(buf, 'Test_splitkeep_callback_4', {})
|
call VerifyScreenDump(buf, 'Test_splitkeep_callback_4', {})
|
||||||
|
|
||||||
|
call StopVimInTerminal(buf)
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
function Test_splitkeep_fold()
|
function Test_splitkeep_fold()
|
||||||
@@ -1891,6 +1893,8 @@ function Test_splitkeep_fold()
|
|||||||
|
|
||||||
call term_sendkeys(buf, ":wincmd k\<CR>:quit\<CR>")
|
call term_sendkeys(buf, ":wincmd k\<CR>:quit\<CR>")
|
||||||
call VerifyScreenDump(buf, 'Test_splitkeep_fold_4', {})
|
call VerifyScreenDump(buf, 'Test_splitkeep_fold_4', {})
|
||||||
|
|
||||||
|
call StopVimInTerminal(buf)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function Test_splitkeep_status()
|
function Test_splitkeep_status()
|
||||||
@@ -1909,6 +1913,8 @@ function Test_splitkeep_status()
|
|||||||
|
|
||||||
call term_sendkeys(buf, ":call win_move_statusline(win, 1)\<CR>")
|
call term_sendkeys(buf, ":call win_move_statusline(win, 1)\<CR>")
|
||||||
call VerifyScreenDump(buf, 'Test_splitkeep_status_1', {})
|
call VerifyScreenDump(buf, 'Test_splitkeep_status_1', {})
|
||||||
|
|
||||||
|
call StopVimInTerminal(buf)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function Test_new_help_window_on_error()
|
function Test_new_help_window_on_error()
|
||||||
|
@@ -695,6 +695,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 */
|
||||||
|
/**/
|
||||||
|
1195,
|
||||||
/**/
|
/**/
|
||||||
1194,
|
1194,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user