vim-patch:8.1.1751: when redrawing popups plines_win() may be called often

Problem:    When redrawing popups plines_win() may be called often.
Solution:   Pass a cache to mouse_comp_pos().

9d5ffceb3f

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
Jan Edmund Lazo
2025-08-31 09:04:34 -04:00
parent 856d2a7892
commit 89e2f346a8

View File

@@ -1602,7 +1602,7 @@ void nv_mouse(cmdarg_T *cap)
do_mouse(cap->oap, cap->cmdchar, BACKWARD, cap->count1, 0);
}
/// Compute the position in the buffer line from the posn on the screen in
/// Compute the buffer line position from the screen position "rowp" / "colp" in
/// window "win".
/// Returns true if the position is below the last line.
bool mouse_comp_pos(win_T *win, int *rowp, int *colp, linenr_T *lnump)