diff src/message.c @ 29982:b579e1f5e7e2 v9.0.0329

patch 9.0.0329: ":highlight" hangs when 'cmdheight' is zero Commit: https://github.com/vim/vim/commit/24735f2a19c666f545330a267a32ae5df72db25c Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 30 15:44:22 2022 +0100 patch 9.0.0329: ":highlight" hangs when 'cmdheight' is zero Problem: ":highlight" hangs when 'cmdheight' is zero. Solution: Add to msg_col when using the message window. (closes https://github.com/vim/vim/issues/11014)
author Bram Moolenaar <Bram@vim.org>
date Tue, 30 Aug 2022 16:45:03 +0200
parents 5dfd4bd66ad8
children bb0e525e1393
line wrap: on
line diff
--- a/src/message.c
+++ b/src/message.c
@@ -2261,7 +2261,7 @@ msg_puts_attr_len(char *str, int maxlen,
 #ifdef HAS_MESSAGE_WINDOW
 
 /*
- * Put text "t_s" until "s" in the message window.
+ * Put text "t_s" until "end" in the message window.
  * "where" specifies where to put the text.
  */
     static void
@@ -2308,7 +2308,7 @@ put_msg_win(win_T *wp, int where, char_u
     redraw_win_later(wp, UPD_NOT_VALID);
 
     // set msg_col so that a newline is written if needed
-    msg_col = (int)STRLEN(t_s);
+    msg_col += (int)(end - t_s);
 }
 #endif