Mercurial > vim
comparison src/ui.c @ 17034:d4a7c690c8e6 v8.1.1517
patch 8.1.1517: when a popup changes all windows are redrawn
commit https://github.com/vim/vim/commit/4c063a0dab57be7bd7aad4b8434feff3db5f1057
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jun 10 21:24:12 2019 +0200
patch 8.1.1517: when a popup changes all windows are redrawn
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 10 Jun 2019 21:30:06 +0200 |
parents | 7cade95272c4 |
children | 5ed4965ebc7b |
comparison
equal
deleted
inserted
replaced
17033:1390ba5ee83c | 17034:d4a7c690c8e6 |
---|---|
3240 count = IN_BUFFER; | 3240 count = IN_BUFFER; |
3241 if (curwin != old_curwin || curwin->w_cursor.lnum != old_cursor.lnum | 3241 if (curwin != old_curwin || curwin->w_cursor.lnum != old_cursor.lnum |
3242 || curwin->w_cursor.col != old_cursor.col) | 3242 || curwin->w_cursor.col != old_cursor.col) |
3243 count |= CURSOR_MOVED; /* Cursor has moved */ | 3243 count |= CURSOR_MOVED; /* Cursor has moved */ |
3244 | 3244 |
3245 #ifdef FEAT_FOLDING | 3245 # ifdef FEAT_FOLDING |
3246 if (mouse_char == '+') | 3246 if (mouse_char == '+') |
3247 count |= MOUSE_FOLD_OPEN; | 3247 count |= MOUSE_FOLD_OPEN; |
3248 else if (mouse_char != ' ') | 3248 else if (mouse_char != ' ') |
3249 count |= MOUSE_FOLD_CLOSE; | 3249 count |= MOUSE_FOLD_CLOSE; |
3250 #endif | 3250 # endif |
3251 | 3251 |
3252 return count; | 3252 return count; |
3253 } | 3253 } |
3254 #endif | |
3255 | |
3256 // Functions also used for popup windows. | |
3257 #if defined(FEAT_MOUSE) || defined(FEAT_TEXT_PROP) || defined(PROTO) | |
3254 | 3258 |
3255 /* | 3259 /* |
3256 * Compute the position in the buffer line from the posn on the screen in | 3260 * Compute the position in the buffer line from the posn on the screen in |
3257 * window "win". | 3261 * window "win". |
3258 * Returns TRUE if the position is below the last line. | 3262 * Returns TRUE if the position is below the last line. |
3345 * Find the window at screen position "*rowp" and "*colp". The positions are | 3349 * Find the window at screen position "*rowp" and "*colp". The positions are |
3346 * updated to become relative to the top-left of the window. | 3350 * updated to become relative to the top-left of the window. |
3347 * Returns NULL when something is wrong. | 3351 * Returns NULL when something is wrong. |
3348 */ | 3352 */ |
3349 win_T * | 3353 win_T * |
3350 mouse_find_win(int *rowp, int *colp UNUSED) | 3354 mouse_find_win(int *rowp, int *colp) |
3351 { | 3355 { |
3352 frame_T *fp; | 3356 frame_T *fp; |
3353 win_T *wp; | 3357 win_T *wp; |
3354 | 3358 |
3355 fp = topframe; | 3359 fp = topframe; |