comparison src/beval.c @ 12981:d52a3969ce4f v8.0.1367

patch 8.0.1367 commit https://github.com/vim/vim/commit/1ad022a9b81d7829d5dc98cf5b8d0ee410558040 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Dec 3 18:20:32 2017 +0100 patch 8.0.1367
author Christian Brabandt <cb@256bit.org>
date Sun, 03 Dec 2017 18:30:04 +0100
parents 058e93aee621
children 8412df1479a3
comparison
equal deleted inserted replaced
12980:55e499af0d75 12981:d52a3969ce4f
48 row = Y_2_ROW(beval->y); 48 row = Y_2_ROW(beval->y);
49 col = X_2_COL(beval->x); 49 col = X_2_COL(beval->x);
50 } 50 }
51 #endif 51 #endif
52 wp = mouse_find_win(&row, &col); 52 wp = mouse_find_win(&row, &col);
53 if (wp != NULL && row < wp->w_height && col < wp->w_width) 53 if (wp != NULL && row >= 0 && row < wp->w_height && col < wp->w_width)
54 { 54 {
55 /* Found a window and the cursor is in the text. Now find the line 55 /* Found a window and the cursor is in the text. Now find the line
56 * number. */ 56 * number. */
57 if (!mouse_comp_pos(wp, &row, &col, &lnum)) 57 if (!mouse_comp_pos(wp, &row, &col, &lnum))
58 { 58 {