Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
29981:b40f65ab0928 | 29982:b579e1f5e7e2 |
---|---|
2259 #define PUT_BELOW 2 // add below "lnum" | 2259 #define PUT_BELOW 2 // add below "lnum" |
2260 // | 2260 // |
2261 #ifdef HAS_MESSAGE_WINDOW | 2261 #ifdef HAS_MESSAGE_WINDOW |
2262 | 2262 |
2263 /* | 2263 /* |
2264 * Put text "t_s" until "s" in the message window. | 2264 * Put text "t_s" until "end" in the message window. |
2265 * "where" specifies where to put the text. | 2265 * "where" specifies where to put the text. |
2266 */ | 2266 */ |
2267 static void | 2267 static void |
2268 put_msg_win(win_T *wp, int where, char_u *t_s, char_u *end, linenr_T lnum) | 2268 put_msg_win(win_T *wp, int where, char_u *t_s, char_u *end, linenr_T lnum) |
2269 { | 2269 { |
2306 curbuf = curwin->w_buffer; | 2306 curbuf = curwin->w_buffer; |
2307 } | 2307 } |
2308 redraw_win_later(wp, UPD_NOT_VALID); | 2308 redraw_win_later(wp, UPD_NOT_VALID); |
2309 | 2309 |
2310 // set msg_col so that a newline is written if needed | 2310 // set msg_col so that a newline is written if needed |
2311 msg_col = (int)STRLEN(t_s); | 2311 msg_col += (int)(end - t_s); |
2312 } | 2312 } |
2313 #endif | 2313 #endif |
2314 | 2314 |
2315 /* | 2315 /* |
2316 * The display part of msg_puts_attr_len(). | 2316 * The display part of msg_puts_attr_len(). |