summaryrefslogtreecommitdiff
path: root/src/term.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-08-04 20:17:31 +0200
committerBram Moolenaar <Bram@vim.org>2020-08-04 20:17:31 +0200
commitecd34bf55d72f530859e290ac02ee41f9fb27cce (patch)
tree14398ccf3e01d8e0233c1994c8e0938086a03e32 /src/term.c
parent6a25026262e2cdbbd8738361c5bd6ebef8862d87 (diff)
downloadvim-git-ecd34bf55d72f530859e290ac02ee41f9fb27cce.tar.gz
patch 8.2.1362: last entry of ":set term=xxx" overwritten by error messagev8.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.
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/term.c b/src/term.c
index 3c0ca779b..3648df6d5 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1763,6 +1763,7 @@ get_term_entries(int *height, int *width)
report_term_error(char *error_msg, char_u *term)
{
struct builtin_term *termp;
+ int i;
mch_errmsg("\r\n");
if (error_msg != NULL)
@@ -1787,6 +1788,10 @@ report_term_error(char *error_msg, char_u *term)
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