summaryrefslogtreecommitdiff
path: root/src/ui.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-06-10 21:24:12 +0200
committerBram Moolenaar <Bram@vim.org>2019-06-10 21:24:12 +0200
commit4c063a0dab57be7bd7aad4b8434feff3db5f1057 (patch)
treee73db7e8dfa79610e7c4b1a4a846688cf0f1b04f /src/ui.c
parent640d4f0c97e686211dc4474b46a83e4435d883c0 (diff)
downloadvim-git-4c063a0dab57be7bd7aad4b8434feff3db5f1057.tar.gz
patch 8.1.1517: when a popup changes all windows are redrawnv8.1.1517
Problem: When a popup changes all windows are redrawn. Solution: Only update the lines that were affected. Add a file for profiling popup windows efficiency.
Diffstat (limited to 'src/ui.c')
-rw-r--r--src/ui.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ui.c b/src/ui.c
index ed0e50abe..4a684d236 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -3242,15 +3242,19 @@ retnomove:
|| curwin->w_cursor.col != old_cursor.col)
count |= CURSOR_MOVED; /* Cursor has moved */
-#ifdef FEAT_FOLDING
+# ifdef FEAT_FOLDING
if (mouse_char == '+')
count |= MOUSE_FOLD_OPEN;
else if (mouse_char != ' ')
count |= MOUSE_FOLD_CLOSE;
-#endif
+# endif
return count;
}
+#endif
+
+// Functions also used for popup windows.
+#if defined(FEAT_MOUSE) || defined(FEAT_TEXT_PROP) || defined(PROTO)
/*
* Compute the position in the buffer line from the posn on the screen in
@@ -3347,7 +3351,7 @@ mouse_comp_pos(
* Returns NULL when something is wrong.
*/
win_T *
-mouse_find_win(int *rowp, int *colp UNUSED)
+mouse_find_win(int *rowp, int *colp)
{
frame_T *fp;
win_T *wp;