summaryrefslogtreecommitdiffstats
path: root/src/message.c
diff options
context:
space:
mode:
authorShougo Matsushita <Shougo.Matsu@gmail.com>2022-07-30 16:54:05 +0100
committerBram Moolenaar <Bram@vim.org>2022-07-30 16:54:05 +0100
commitf39cfb72629f3e7fefaf578a3faa2619cd0654f8 (patch)
treea990dd08ff44924fdfe2b915644fe49e4996ea99 /src/message.c
parentd90f91fe3075bb51668ed926182b2163da9df001 (diff)
patch 9.0.0114: the command line takes up space even when not usedv9.0.0114
Problem: The command line takes up space even when not used. Solution: Allow for 'cmdheight' to be set to zero. (Shougo Matsushita, closes #10675, closes #940)
Diffstat (limited to 'src/message.c')
-rw-r--r--src/message.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/message.c b/src/message.c
index 50a174928c..ec43387f6c 100644
--- a/src/message.c
+++ b/src/message.c
@@ -953,7 +953,7 @@ msg_may_trunc(int force, char_u *s)
// just in case.
room = (int)(Rows - cmdline_row - 1) * Columns + sc_col - 1;
if (room > 0 && (force || (shortmess(SHM_TRUNC) && !exmode_active))
- && (n = (int)STRLEN(s) - room) > 0)
+ && (n = (int)STRLEN(s) - room) > 0 && p_ch > 0)
{
if (has_mbyte)
{
@@ -1430,7 +1430,7 @@ msg_start(void)
}
#ifdef FEAT_EVAL
- if (need_clr_eos)
+ if (need_clr_eos || p_ch == 0)
{
// Halfway an ":echo" command and getting an (error) message: clear
// any text from the command.
@@ -1448,7 +1448,7 @@ msg_start(void)
#endif
0;
}
- else if (msg_didout) // start message on next line
+ else if (msg_didout || p_ch == 0) // start message on next line
{
msg_putchar('\n');
did_return = TRUE;
@@ -3460,7 +3460,7 @@ msg_clr_eos_force(void)
out_str(T_CE); // clear to end of line
}
}
- else
+ else if (p_ch > 0)
{
#ifdef FEAT_RIGHTLEFT
if (cmdmsg_rl)