diff src/popupwin.c @ 22377:b2cb2a321af9 v8.2.1737

patch 8.2.1737: cursor line highlight in popup window is not always updated Commit: https://github.com/vim/vim/commit/10476521f51d5902d191f2189307781fc48a3a16 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 24 22:57:31 2020 +0200 patch 8.2.1737: cursor line highlight in popup window is not always updated Problem: Cursor line highlight in popup window is not always updated. Solution: Check if the cursor has moved. (closes https://github.com/vim/vim/issues/7010)
author Bram Moolenaar <Bram@vim.org>
date Thu, 24 Sep 2020 23:00:04 +0200
parents 997bbc35c181
children 3351d2cd3f1f
line wrap: on
line diff
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -3711,6 +3711,11 @@ update_popups(void (*win_update)(win_T *
 	// Draw the popup text, unless it's off screen.
 	if (wp->w_winrow < screen_Rows && wp->w_wincol < screen_Columns)
 	{
+	    // May need to update the "cursorline" highlighting, which may also
+	    // change "topline"
+	    if (wp->w_popup_last_curline != wp->w_cursor.lnum)
+		popup_highlight_curline(wp);
+
 	    win_update(wp);
 
 	    // move the cursor into the visible lines, otherwise executing