Patch 9.0.1195
Problem: Restoring KeyTyped when building statusline not tested.
Solution: Add a test. Clean up and fix other tests. (closes #11815)
Files: src/globals.h, src/testdir/test_statusline.vim,
src/testdir/test_tabline.vim, src/testdir/test_window_cmd.vim,
src/testdir/dumps/Test_statusline_showcmd_1.dump,
src/testdir/dumps/Test_statusline_showcmd_2.dump,
src/testdir/dumps/Test_statusline_showcmd_3.dump,
src/testdir/dumps/Test_statusline_showcmd_4.dump,
src/testdir/dumps/Test_statusline_showcmd_5.dump,
src/testdir/dumps/Test_tabline_showcmd_1.dump,
src/testdir/dumps/Test_tabline_showcmd_2.dump,
src/testdir/dumps/Test_tabline_showcmd_3.dump,
src/testdir/dumps/Test_tabline_showcmd_4.dump,
src/testdir/dumps/Test_tabline_showcmd_5.dump
*** ../vim-9.0.1194/src/globals.h 2023-01-11 15:59:01.175405240 +0000
--- src/globals.h 2023-01-14 11:42:17.828867950 +0000
***************
*** 2043,2048 ****
// Skip update_topline() call while executing win_fix_scroll().
EXTERN int skip_update_topline INIT(= FALSE);
! // 'showcmd' buffer shared between normal.c and statusline.c
#define SHOWCMD_BUFLEN (SHOWCMD_COLS + 1 + 30)
EXTERN char_u showcmd_buf[SHOWCMD_BUFLEN];
--- 2043,2048 ----
// Skip update_topline() call while executing win_fix_scroll().
EXTERN int skip_update_topline INIT(= FALSE);
! // 'showcmd' buffer shared between normal.c and statusline code
#define SHOWCMD_BUFLEN (SHOWCMD_COLS + 1 + 30)
EXTERN char_u showcmd_buf[SHOWCMD_BUFLEN];
*** ../vim-9.0.1194/src/testdir/test_statusline.vim 2023-01-04
14:31:46.102074865 +0000
--- src/testdir/test_statusline.vim 2023-01-14 11:42:17.828867950 +0000
***************
*** 569,590 ****
CheckScreendump
let lines =<< trim END
set laststatus=2
! set statusline=%S
set showcmdloc=statusline
call setline(1, ['a', 'b', 'c'])
END
call writefile(lines, 'XTest_statusline', 'D')
let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 6})
! call feedkeys("\<C-V>Gl", "xt")
call VerifyScreenDump(buf, 'Test_statusline_showcmd_1', {})
! call feedkeys("\<Esc>1234", "xt")
call VerifyScreenDump(buf, 'Test_statusline_showcmd_2', {})
! call feedkeys("\<Esc>:set statusline=\<CR>:\<CR>1234", "xt")
call VerifyScreenDump(buf, 'Test_statusline_showcmd_3', {})
endfunc
" vim: shiftwidth=2 sts=2 expandtab
--- 569,609 ----
CheckScreendump
let lines =<< trim END
+ func MyStatusLine()
+ return '%S'
+ endfunc
+
set laststatus=2
! set statusline=%!MyStatusLine()
set showcmdloc=statusline
call setline(1, ['a', 'b', 'c'])
+ set foldopen+=jump
+ 1,2fold
+ 3
END
call writefile(lines, 'XTest_statusline', 'D')
let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 6})
!
! call term_sendkeys(buf, "g")
call VerifyScreenDump(buf, 'Test_statusline_showcmd_1', {})
! " typing "gg" should open the fold
! call term_sendkeys(buf, "g")
call VerifyScreenDump(buf, 'Test_statusline_showcmd_2', {})
! call term_sendkeys(buf, "\<C-V>Gl")
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
" vim: shiftwidth=2 sts=2 expandtab
*** ../vim-9.0.1194/src/testdir/test_tabline.vim 2022-12-15
13:14:17.415527399 +0000
--- src/testdir/test_tabline.vim 2023-01-14 11:42:17.832867948 +0000
***************
*** 165,183 ****
CheckScreendump
let lines =<< trim END
set showtabline=2
set showcmdloc=tabline
call setline(1, ['a', 'b', 'c'])
END
call writefile(lines, 'XTest_tabline', 'D')
let buf = RunVimInTerminal('-S XTest_tabline', {'rows': 6})
! call feedkeys("\<C-V>Gl", "xt")
call VerifyScreenDump(buf, 'Test_tabline_showcmd_1', {})
! call feedkeys("\<Esc>1234", "xt")
call VerifyScreenDump(buf, 'Test_tabline_showcmd_2', {})
endfunc
" vim: shiftwidth=2 sts=2 expandtab
--- 165,205 ----
CheckScreendump
let lines =<< trim END
+ func MyTabLine()
+ return '%S'
+ endfunc
+
set showtabline=2
+ set tabline=%!MyTabLine()
set showcmdloc=tabline
call setline(1, ['a', 'b', 'c'])
+ set foldopen+=jump
+ 1,2fold
+ 3
END
call writefile(lines, 'XTest_tabline', 'D')
let buf = RunVimInTerminal('-S XTest_tabline', {'rows': 6})
! call term_sendkeys(buf, "g")
call VerifyScreenDump(buf, 'Test_tabline_showcmd_1', {})
! " typing "gg" should open the fold
! call term_sendkeys(buf, "g")
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
" vim: shiftwidth=2 sts=2 expandtab
*** ../vim-9.0.1194/src/testdir/test_window_cmd.vim 2022-12-13
12:26:04.855054169 +0000
--- src/testdir/test_window_cmd.vim 2023-01-14 11:42:17.832867948 +0000
***************
*** 1861,1866 ****
--- 1861,1868 ----
call term_sendkeys(buf, ":quit\<CR>Gt")
call VerifyScreenDump(buf, 'Test_splitkeep_callback_4', {})
+
+ call StopVimInTerminal(buf)
endfunc
function Test_splitkeep_fold()
***************
*** 1891,1896 ****
--- 1893,1900 ----
call term_sendkeys(buf, ":wincmd k\<CR>:quit\<CR>")
call VerifyScreenDump(buf, 'Test_splitkeep_fold_4', {})
+
+ call StopVimInTerminal(buf)
endfunction
function Test_splitkeep_status()
***************
*** 1909,1914 ****
--- 1913,1920 ----
call term_sendkeys(buf, ":call win_move_statusline(win, 1)\<CR>")
call VerifyScreenDump(buf, 'Test_splitkeep_status_1', {})
+
+ call StopVimInTerminal(buf)
endfunction
function Test_new_help_window_on_error()
*** ../vim-9.0.1194/src/testdir/dumps/Test_statusline_showcmd_1.dump
2022-12-15 13:14:17.415527399 +0000
--- src/testdir/dumps/Test_statusline_showcmd_1.dump 2023-01-14
11:42:17.828867950 +0000
***************
*** 1,6 ****
! |a+0&#e0e0e08| +0&#ffffff0@73
! |b+0&#e0e0e08| +0&#ffffff0@73
! |c+0&#e0e0e08> +0&#ffffff0@73
|~+0#4040ff13&| @73
! |3+3#0000000&|x|2| @71
! |-+2&&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@56
--- 1,6 ----
! |++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |a|-@59
! >c+0#0000000#ffffff0| @73
|~+0#4040ff13&| @73
! |~| @73
! |g+3#0000000&| @73
! | +0&&@74
*** ../vim-9.0.1194/src/testdir/dumps/Test_statusline_showcmd_2.dump
2022-12-15 13:14:17.415527399 +0000
--- src/testdir/dumps/Test_statusline_showcmd_2.dump 2023-01-14
11:42:17.828867950 +0000
***************
*** 1,6 ****
! |a+0&#ffffff0| @73
|b| @73
! >c| @73
|~+0#4040ff13&| @73
! |1+3#0000000&|2|3|4| @70
| +0&&@74
--- 1,6 ----
! >a+0&#ffffff0| @73
|b| @73
! |c| @73
|~+0#4040ff13&| @73
! | +3#0000000&@74
| +0&&@74
*** ../vim-9.0.1194/src/testdir/dumps/Test_statusline_showcmd_3.dump
2022-12-15 13:14:17.415527399 +0000
--- src/testdir/dumps/Test_statusline_showcmd_3.dump 2023-01-14
11:42:17.828867950 +0000
***************
*** 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 ----
! |a+0&#e0e0e08| +0&#ffffff0@73
! |b+0&#e0e0e08| +0&#ffffff0@73
! |c+0&#e0e0e08> +0&#ffffff0@73
|~+0#4040ff13&| @73
! |3+3#0000000&|x|2| @71
! |-+2&&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@56
*** ../vim-9.0.1194/src/testdir/dumps/Test_statusline_showcmd_4.dump
2023-01-14 11:46:03.668721521 +0000
--- src/testdir/dumps/Test_statusline_showcmd_4.dump 2023-01-14
11:42:17.828867950 +0000
***************
*** 0 ****
--- 1,6 ----
+ |a+0&#ffffff0| @73
+ |b| @73
+ >c| @73
+ |~+0#4040ff13&| @73
+ |1+3#0000000&|2|3|4| @70
+ | +0&&@74
*** ../vim-9.0.1194/src/testdir/dumps/Test_statusline_showcmd_5.dump
2023-01-14 11:46:03.676721515 +0000
--- src/testdir/dumps/Test_statusline_showcmd_5.dump 2023-01-14
11:42:17.828867950 +0000
***************
*** 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
*** ../vim-9.0.1194/src/testdir/dumps/Test_tabline_showcmd_1.dump
2022-12-15 13:14:17.415527399 +0000
--- src/testdir/dumps/Test_tabline_showcmd_1.dump 2023-01-14
11:42:17.828867950 +0000
***************
*** 1,6 ****
! | +2&#ffffff0|+| |[|N|o| |N|a|m|e|]| | +1&&@51|3+8#0000001#e0e0e08|x|2|
+1#0000000#ffffff0@6
! |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|
--- 1,6 ----
! |g+1&#ffffff0| @73
! |++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |a|-@59
! >c+0#0000000#ffffff0| @73
|~+0#4040ff13&| @73
! |~| @73
! | +0#0000000&@56|3|,|1| @10|A|l@1|
*** ../vim-9.0.1194/src/testdir/dumps/Test_tabline_showcmd_2.dump
2022-12-15 13:14:17.415527399 +0000
--- src/testdir/dumps/Test_tabline_showcmd_2.dump 2023-01-14
11:42:17.828867950 +0000
***************
*** 1,6 ****
! | +2&#ffffff0|+| |[|N|o| |N|a|m|e|]| | +1&&@51|1+8#0000001#e0e0e08|2|3|4|
+1#0000000#ffffff0@5
! |a+0&&| @73
|b| @73
! >c| @73
|~+0#4040ff13&| @73
! | +0#0000000&@56|3|,|1| @10|A|l@1|
--- 1,6 ----
! | +1&#ffffff0@74
! >a+0&&| @73
|b| @73
! |c| @73
|~+0#4040ff13&| @73
! | +0#0000000&@56|1|,|1| @10|A|l@1|
*** ../vim-9.0.1194/src/testdir/dumps/Test_tabline_showcmd_3.dump
2023-01-14 11:46:03.688721508 +0000
--- src/testdir/dumps/Test_tabline_showcmd_3.dump 2023-01-14
11:42:17.828867950 +0000
***************
*** 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|
*** ../vim-9.0.1194/src/testdir/dumps/Test_tabline_showcmd_4.dump
2023-01-14 11:46:03.692721507 +0000
--- src/testdir/dumps/Test_tabline_showcmd_4.dump 2023-01-14
11:42:17.828867950 +0000
***************
*** 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|
*** ../vim-9.0.1194/src/version.c 2023-01-13 19:18:35.029796008 +0000
--- src/version.c 2023-01-14 11:44:39.876773924 +0000
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 1195,
/**/
--
Everybody wants to go to heaven, but nobody wants to die.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20230114114725.B6F3D1C091A%40moolenaar.net.