Patch 8.2.1362
Problem: Last entry of ":set term=xxx" overwritten by error message when
'cmdheight' is two or more. (Tony Mechelynck)
Solution: Output extra line breaks.
Files: src/term.c, src/testdir/test_termcodes.vim
*** ../vim-8.2.1361/src/term.c 2020-07-14 23:02:38.180781060 +0200
--- src/term.c 2020-08-04 19:35:13.770435128 +0200
***************
*** 1763,1768 ****
--- 1763,1769 ----
report_term_error(char *error_msg, char_u *term)
{
struct builtin_term *termp;
+ int i;
mch_errmsg("\r\n");
if (error_msg != NULL)
***************
*** 1787,1792 ****
--- 1788,1797 ----
mch_errmsg("\r\n");
}
}
+ // Output extra 'cmdheight' line breaks to avoid that the following error
+ // message overwrites the last terminal name.
+ for (i = 1; i < p_ch; ++i)
+ mch_errmsg("\r\n");
}
static void
*** ../vim-8.2.1361/src/testdir/test_termcodes.vim 2020-07-18
12:59:16.488052332 +0200
--- src/testdir/test_termcodes.vim 2020-08-04 20:00:17.138165745 +0200
***************
*** 7,12 ****
--- 7,13 ----
source shared.vim
source mouse.vim
+ source view_util.vim
func Test_term_mouse_left_click()
new
***************
*** 1893,1898 ****
--- 1894,1910 ----
set ttybuiltin
endfunc
+ func Test_list_builtin_terminals()
+ let buf = RunVimInTerminal('', #{rows: 14})
+ call term_sendkeys(buf, ":set cmdheight=3\<CR>")
+ call term_wait(buf, 100)
+ call term_sendkeys(buf, ":set term=xxx\<CR>")
+ call term_wait(buf, 100)
+ call assert_match('builtin_dumb', term_getline(buf, 11))
+ call assert_match('Not found in termcap', term_getline(buf, 12))
+ call StopVimInTerminal(buf)
+ endfunc
+
func GetEscCodeCSI27(key, modifier)
let key = printf("%d", char2nr(a:key))
let mod = printf("%d", a:modifier)
*** ../vim-8.2.1361/src/version.c 2020-08-04 15:52:58.285452983 +0200
--- src/version.c 2020-08-04 19:40:57.893357070 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 1362,
/**/
--
An actual excerpt from a classified section of a city newspaper:
"Illiterate? Write today for free help!"
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ 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/202008041817.074IHvfO3081395%40masaka.moolenaar.net.