Mercurial > vim
comparison src/popupwin.c @ 17194:f4c6c1bc5e41 v8.1.1596
patch 8.1.1596: when resizing the screen may draw popup in wrong position
commit https://github.com/vim/vim/commit/c2a43165004f944a909428e80700130745c08ed0
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jun 26 01:03:53 2019 +0200
patch 8.1.1596: when resizing the screen may draw popup in wrong position
Problem: When resizing the screen may draw popup in wrong position. (Masato
Nishihata)
Solution: Check the popup is not outside of the screen. (fixes #4592)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 26 Jun 2019 01:15:17 +0200 |
parents | 8581779aa16f |
children | 983950357c40 |
comparison
equal
deleted
inserted
replaced
17193:1bd075bf6f8b | 17194:f4c6c1bc5e41 |
---|---|
2152 top_off = popup_top_extra(wp); | 2152 top_off = popup_top_extra(wp); |
2153 left_off = wp->w_popup_padding[3] + wp->w_popup_border[3]; | 2153 left_off = wp->w_popup_padding[3] + wp->w_popup_border[3]; |
2154 wp->w_winrow += top_off; | 2154 wp->w_winrow += top_off; |
2155 wp->w_wincol += left_off; | 2155 wp->w_wincol += left_off; |
2156 | 2156 |
2157 // Draw the popup text. | 2157 // Draw the popup text, unless it's off screen. |
2158 win_update(wp); | 2158 if (wp->w_winrow < screen_Rows && wp->w_wincol < screen_Columns) |
2159 win_update(wp); | |
2159 | 2160 |
2160 wp->w_winrow -= top_off; | 2161 wp->w_winrow -= top_off; |
2161 wp->w_wincol -= left_off; | 2162 wp->w_wincol -= left_off; |
2162 | 2163 |
2163 total_width = wp->w_popup_border[3] + wp->w_popup_padding[3] | 2164 total_width = wp->w_popup_border[3] + wp->w_popup_padding[3] |