comparison src/beval.c @ 17506:74b6674b99fd v8.1.1751

patch 8.1.1751: when redrawing popups plines_win() may be called often commit https://github.com/vim/vim/commit/9d5ffceb3fea247a88d4d3936e97b7f488aab6ff Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jul 26 21:01:29 2019 +0200 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().
author Bram Moolenaar <Bram@vim.org>
date Fri, 26 Jul 2019 21:15:06 +0200
parents e685de8a1ac6
children c8a53c0daeed
comparison
equal deleted inserted replaced
17505:a76219d230b3 17506:74b6674b99fd
41 wp = mouse_find_win(&row, &col, FAIL_POPUP); 41 wp = mouse_find_win(&row, &col, FAIL_POPUP);
42 if (wp != NULL && row >= 0 && row < wp->w_height && col < wp->w_width) 42 if (wp != NULL && row >= 0 && row < wp->w_height && col < wp->w_width)
43 { 43 {
44 // Found a window and the cursor is in the text. Now find the line 44 // Found a window and the cursor is in the text. Now find the line
45 // number. 45 // number.
46 if (!mouse_comp_pos(wp, &row, &col, &lnum)) 46 if (!mouse_comp_pos(wp, &row, &col, &lnum, NULL))
47 { 47 {
48 // Not past end of the file. 48 // Not past end of the file.
49 lbuf = ml_get_buf(wp->w_buffer, lnum, FALSE); 49 lbuf = ml_get_buf(wp->w_buffer, lnum, FALSE);
50 if (col <= win_linetabsize(wp, lbuf, (colnr_T)MAXCOL)) 50 if (col <= win_linetabsize(wp, lbuf, (colnr_T)MAXCOL))
51 { 51 {