Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
22376:6820ccdb87df | 22377:b2cb2a321af9 |
---|---|
3709 wp->w_wincol += left_extra; | 3709 wp->w_wincol += left_extra; |
3710 | 3710 |
3711 // Draw the popup text, unless it's off screen. | 3711 // Draw the popup text, unless it's off screen. |
3712 if (wp->w_winrow < screen_Rows && wp->w_wincol < screen_Columns) | 3712 if (wp->w_winrow < screen_Rows && wp->w_wincol < screen_Columns) |
3713 { | 3713 { |
3714 // May need to update the "cursorline" highlighting, which may also | |
3715 // change "topline" | |
3716 if (wp->w_popup_last_curline != wp->w_cursor.lnum) | |
3717 popup_highlight_curline(wp); | |
3718 | |
3714 win_update(wp); | 3719 win_update(wp); |
3715 | 3720 |
3716 // move the cursor into the visible lines, otherwise executing | 3721 // move the cursor into the visible lines, otherwise executing |
3717 // commands with win_execute() may cause the text to jump. | 3722 // commands with win_execute() may cause the text to jump. |
3718 if (wp->w_cursor.lnum < wp->w_topline) | 3723 if (wp->w_cursor.lnum < wp->w_topline) |