Mercurial > vim
diff src/popupwin.c @ 17041:5ed4965ebc7b v8.1.1520
patch 8.1.1520: popup windows are ignored when dealing with mouse position
commit https://github.com/vim/vim/commit/451d4b5b7c7262631cd1f5057c75d6f5f5772fb1
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jun 12 20:22:27 2019 +0200
patch 8.1.1520: popup windows are ignored when dealing with mouse position
Problem: Popup windows are ignored when dealing with mouse position
Solution: Find the mouse position inside a popup window. Allow for modeless
selection.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 12 Jun 2019 20:30:07 +0200 |
parents | d4a7c690c8e6 |
children | 7fe328ad5573 |
line wrap: on
line diff
--- a/src/popupwin.c +++ b/src/popupwin.c @@ -424,6 +424,28 @@ add_popup_dicts(buf_T *buf, list_T *l) } /* + * Return the height of popup window "wp", including border and padding. + */ + int +popup_height(win_T *wp) +{ + return wp->w_height + + wp->w_popup_padding[0] + wp->w_popup_border[0] + + wp->w_popup_padding[2] + wp->w_popup_border[2]; +} + +/* + * Return the width of popup window "wp", including border and padding. + */ + int +popup_width(win_T *wp) +{ + return wp->w_width + + wp->w_popup_padding[3] + wp->w_popup_border[3] + + wp->w_popup_padding[1] + wp->w_popup_border[1]; +} + +/* * Adjust the position and size of the popup to fit on the screen. */ void