]> granicus.if.org Git - vim/commitdiff
patch 8.1.1648: MS-Windows: build error with normal feaures v8.1.1648
authorBram Moolenaar <Bram@vim.org>
Sun, 7 Jul 2019 18:30:48 +0000 (20:30 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 7 Jul 2019 18:30:48 +0000 (20:30 +0200)
Problem:    MS-Windows: build error with normal feaures.
Solution:   Adjust #ifdef for find_word_under_cursor().

src/beval.c
src/proto/beval.pro
src/version.c

index 2cbe7ea1f0539ce337bb7a0aa8cfd73ea0c8d4e7..010e20105197d9b0bbabf3e2cb12923844ddfcba 100644 (file)
 
 #include "vim.h"
 
-#if defined(FEAT_BEVAL) || defined(PROTO)
-
-/*
- * Get the text and position to be evaluated for "beval".
- * If "getword" is TRUE the returned text is not the whole line but the
- * relevant word in allocated memory.
- * Returns OK or FAIL.
- */
-    int
-get_beval_info(
-    BalloonEval        *beval,
-    int                getword,
-    win_T      **winp,
-    linenr_T   *lnump,
-    char_u     **textp,
-    int                *colp)
-{
-    int                row, 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)
-    {
-       row = Y_2_ROW(beval->y);
-       col = X_2_COL(beval->x);
-    }
-#endif
-    if (find_word_under_cursor(row, col, getword,
-               FIND_IDENT + FIND_STRING + FIND_EVAL,
-               winp, lnump, textp, colp) == OK)
-    {
-#ifdef FEAT_VARTABS
-       vim_free(beval->vts);
-       beval->vts = tabstop_copy((*winp)->w_buffer->b_p_vts_array);
-       if ((*winp)->w_buffer->b_p_vts_array != NULL && beval->vts == NULL)
-       {
-           if (getword)
-               vim_free(*textp);
-           return FAIL;
-       }
-#endif
-       beval->ts = (*winp)->w_buffer->b_p_ts;
-       return OK;
-    }
-
-    return FAIL;
-}
-
+#if defined(FEAT_BEVAL) || defined(FEAT_TEXT_PROP) || defined(PROT)
 /*
  * Find text under the mouse position "row" / "col".
  * If "getword" is TRUE the returned text in "*textp" is not the whole line but
@@ -174,6 +119,63 @@ find_word_under_cursor(
     }
     return FAIL;
 }
+#endif
+
+#if defined(FEAT_BEVAL) || defined(PROTO)
+
+/*
+ * Get the text and position to be evaluated for "beval".
+ * If "getword" is TRUE the returned text is not the whole line but the
+ * relevant word in allocated memory.
+ * Returns OK or FAIL.
+ */
+    int
+get_beval_info(
+    BalloonEval        *beval,
+    int                getword,
+    win_T      **winp,
+    linenr_T   *lnump,
+    char_u     **textp,
+    int                *colp)
+{
+    int                row, 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)
+    {
+       row = Y_2_ROW(beval->y);
+       col = X_2_COL(beval->x);
+    }
+#endif
+    if (find_word_under_cursor(row, col, getword,
+               FIND_IDENT + FIND_STRING + FIND_EVAL,
+               winp, lnump, textp, colp) == OK)
+    {
+#ifdef FEAT_VARTABS
+       vim_free(beval->vts);
+       beval->vts = tabstop_copy((*winp)->w_buffer->b_p_vts_array);
+       if ((*winp)->w_buffer->b_p_vts_array != NULL && beval->vts == NULL)
+       {
+           if (getword)
+               vim_free(*textp);
+           return FAIL;
+       }
+#endif
+       beval->ts = (*winp)->w_buffer->b_p_ts;
+       return OK;
+    }
+
+    return FAIL;
+}
 
 /*
  * Show a balloon with "mesg" or "list".
index 0238907ea2f2ee1f85a36e0d1b9e290842c86518..62eba9ef0b42d52acf6ead60beefdf95d80ae978 100644 (file)
@@ -1,6 +1,6 @@
 /* beval.c */
-int get_beval_info(BalloonEval *beval, int getword, win_T **winp, linenr_T *lnump, char_u **textp, int *colp);
 int find_word_under_cursor(int mouserow, int mousecol, int getword, int flags, win_T **winp, linenr_T *lnump, char_u **textp, int *colp);
+int get_beval_info(BalloonEval *beval, int getword, win_T **winp, linenr_T *lnump, char_u **textp, int *colp);
 void post_balloon(BalloonEval *beval, char_u *mesg, list_T *list);
 int can_use_beval(void);
 void general_beval_cb(BalloonEval *beval, int state);
index 5cf7da3356a009c7d0b0171acd0b58f977d3d1d4..4952b7088f4076d04af8185093bb3494983d939b 100644 (file)
@@ -777,6 +777,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1648,
 /**/
     1647,
 /**/