summaryrefslogtreecommitdiff
path: root/src/beval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-07-08 20:08:44 +0200
committerBram Moolenaar <Bram@vim.org>2019-07-08 20:08:44 +0200
commitee9e604124682b0cd89e4f987a2f6f3fe4160920 (patch)
tree3d8c96fff9cedd548bf9e773050836457fe4ab99 /src/beval.c
parent3e35d05b1f99419be27ea5be70c7d0610202c163 (diff)
downloadvim-git-ee9e604124682b0cd89e4f987a2f6f3fe4160920.tar.gz
patch 8.1.1650: warning for using uninitialized variablev8.1.1650
Problem: Warning for using uninitialized variable. (Tony Mechelynck) Solution: Simplify the code by always using the mouse coordinates.
Diffstat (limited to 'src/beval.c')
-rw-r--r--src/beval.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/beval.c b/src/beval.c
index 010e20105..68df2be9e 100644
--- a/src/beval.c
+++ b/src/beval.c
@@ -131,24 +131,16 @@ find_word_under_cursor(
*/
int
get_beval_info(
- BalloonEval *beval,
- int getword,
- win_T **winp,
- linenr_T *lnump,
- char_u **textp,
- int *colp)
+ BalloonEval *beval,
+ int getword,
+ win_T **winp,
+ linenr_T *lnump,
+ char_u **textp,
+ int *colp)
{
- int row, col;
+ int row = mouse_row;
+ int col = mouse_col;
-# ifdef FEAT_BEVAL_TERM
-# ifdef FEAT_GUI
- if (!gui.in_use)
-# endif
- {
- row = mouse_row;
- col = mouse_col;
- }
-# endif
# ifdef FEAT_GUI
if (gui.in_use)
{