comparison src/beval.c @ 17302:e0d727872758 v8.1.1650

patch 8.1.1650: warning for using uninitialized variable commit https://github.com/vim/vim/commit/ee9e604124682b0cd89e4f987a2f6f3fe4160920 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jul 8 20:08:44 2019 +0200 patch 8.1.1650: warning for using uninitialized variable Problem: Warning for using uninitialized variable. (Tony Mechelynck) Solution: Simplify the code by always using the mouse coordinates.
author Bram Moolenaar <Bram@vim.org>
date Mon, 08 Jul 2019 20:15:05 +0200
parents 3d90ae62deca
children 1b0b90f1d95e
comparison
equal deleted inserted replaced
17301:59392e352add 17302:e0d727872758
129 * relevant word in allocated memory. 129 * relevant word in allocated memory.
130 * Returns OK or FAIL. 130 * Returns OK or FAIL.
131 */ 131 */
132 int 132 int
133 get_beval_info( 133 get_beval_info(
134 BalloonEval *beval, 134 BalloonEval *beval,
135 int getword, 135 int getword,
136 win_T **winp, 136 win_T **winp,
137 linenr_T *lnump, 137 linenr_T *lnump,
138 char_u **textp, 138 char_u **textp,
139 int *colp) 139 int *colp)
140 { 140 {
141 int row, col; 141 int row = mouse_row;
142 142 int col = mouse_col;
143 # ifdef FEAT_BEVAL_TERM 143
144 # ifdef FEAT_GUI
145 if (!gui.in_use)
146 # endif
147 {
148 row = mouse_row;
149 col = mouse_col;
150 }
151 # endif
152 # ifdef FEAT_GUI 144 # ifdef FEAT_GUI
153 if (gui.in_use) 145 if (gui.in_use)
154 { 146 {
155 row = Y_2_ROW(beval->y); 147 row = Y_2_ROW(beval->y);
156 col = X_2_COL(beval->x); 148 col = X_2_COL(beval->x);