# HG changeset patch # User Bram Moolenaar # Date 1661870703 -7200 # Node ID b579e1f5e7e257f0d3c9e8a6c355e27ec7360ee3 # Parent b40f65ab0928380380640a897ed0002110a45ab4 patch 9.0.0329: ":highlight" hangs when 'cmdheight' is zero Commit: https://github.com/vim/vim/commit/24735f2a19c666f545330a267a32ae5df72db25c Author: Bram Moolenaar 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) diff --git a/src/highlight.c b/src/highlight.c --- a/src/highlight.c +++ b/src/highlight.c @@ -1429,6 +1429,7 @@ do_highlight( // If no argument, list current highlighting. if (!init && ends_excmd2(line - 1, line)) { + dont_use_message_window(); for (i = 1; i <= highlight_ga.ga_len && !got_int; ++i) // TODO: only call when the group has attributes set highlight_list_one((int)i); diff --git a/src/message.c b/src/message.c --- 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 diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -708,6 +708,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 329, +/**/ 328, /**/ 327,