patch 8.1.2371: FEAT_TEXT_PROP is a confusing name
Problem: FEAT_TEXT_PROP is a confusing name.
Solution: Use FEAT_PROP_POPUP. (Naruhiko Nishino, closes #5291)
diff --git a/src/beval.c b/src/beval.c
index 1bc31a1..63aaf13 100644
--- a/src/beval.c
+++ b/src/beval.c
@@ -10,7 +10,7 @@
#include "vim.h"
-#if defined(FEAT_BEVAL) || defined(FEAT_TEXT_PROP) || defined(PROTO)
+#if defined(FEAT_BEVAL) || defined(FEAT_PROP_POPUP) || defined(PROTO)
/*
* Find text under the mouse position "row" / "col".
* If "getword" is TRUE the returned text in "*textp" is not the whole line but
diff --git a/src/buffer.c b/src/buffer.c
index 4868428..4f38f91 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -861,7 +861,7 @@
#ifdef FEAT_SYN_HL
syntax_clear(&buf->b_s); // reset syntax info
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
clear_buf_prop_types(buf);
#endif
buf->b_flags &= ~BF_READERR; // a read error is no longer relevant
@@ -5522,7 +5522,7 @@
if (bt_prompt(buf))
return (char_u *)_("[Prompt]");
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (bt_popup(buf))
return (char_u *)_("[Popup]");
#endif
diff --git a/src/change.c b/src/change.c
index d0462db..f2dfc93 100644
--- a/src/change.c
+++ b/src/change.c
@@ -698,7 +698,7 @@
static void
inserted_bytes(linenr_T lnum, colnr_T col, int added UNUSED)
{
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (curbuf->b_has_textprop && added != 0)
adjust_prop_columns(lnum, col, added, 0);
#endif
@@ -1289,7 +1289,7 @@
mch_memmove(newp + col, oldp + col + count, (size_t)movelen);
if (alloc_newp)
ml_replace(lnum, newp, FALSE);
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
else
{
// Also move any following text properties.
@@ -2075,7 +2075,7 @@
)
mark_adjust(curwin->w_cursor.lnum + 1, (linenr_T)MAXLNUM, 1L, 0L);
did_append = TRUE;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if ((State & INSERT) && !(State & VREPLACE_FLAG))
// properties after the split move to the next line
adjust_props_for_split(curwin->w_cursor.lnum, curwin->w_cursor.lnum,
diff --git a/src/drawline.c b/src/drawline.c
index 189ed80..95ade68 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -182,7 +182,7 @@
}
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
static textprop_T *current_text_props = NULL;
static buf_T *current_buf = NULL;
@@ -297,7 +297,7 @@
int *color_cols = NULL; // pointer to according columns array
#endif
int eol_hl_off = 0; // 1 if highlighted char after EOL
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
int text_prop_count;
int text_prop_next = 0; // next text property to use
textprop_T *text_props = NULL;
@@ -752,7 +752,7 @@
area_highlighting = TRUE;
}
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (WIN_IS_POPUP(wp))
screen_line_flags |= SLF_POPUP;
#endif
@@ -924,7 +924,7 @@
}
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
{
char_u *prop_start;
@@ -1347,7 +1347,7 @@
}
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (text_props != NULL)
{
int pi;
@@ -1472,7 +1472,7 @@
# endif
}
}
-# ifdef FEAT_TEXT_PROP
+# ifdef FEAT_PROP_POPUP
// Combine text property highlight into syntax highlight.
if (text_prop_type != NULL)
{
@@ -3124,7 +3124,7 @@
cap_col = 0;
}
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
vim_free(text_props);
vim_free(text_prop_idxs);
#endif
diff --git a/src/drawscreen.c b/src/drawscreen.c
index de0fc6b..3a88ee9 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -149,7 +149,7 @@
}
updating_screen = TRUE;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
// Update popup_mask if needed. This may set w_redraw_top and w_redraw_bot
// in some windows.
may_update_popup_mask(type);
@@ -335,7 +335,7 @@
FOR_ALL_WINDOWS(wp)
wp->w_buffer->b_mod_set = FALSE;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
// Display popup windows on top of the windows and command line.
update_popups(win_update);
#endif
@@ -2476,7 +2476,7 @@
wp->w_filler_rows = wp->w_height - srow;
}
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
else if (WIN_IS_POPUP(wp))
{
// popup line that doesn't fit is left as-is
@@ -2585,7 +2585,7 @@
!= (VALID_WCOL|VALID_WROW))
{
// A win_line() call applied a fix to screen cursor column to
- // accomodate concealment of cursor line, but in this call to
+ // accommodate concealment of cursor line, but in this call to
// update_topline() the cursor's row or column got invalidated.
// If they are left invalid, setcursor() will recompute them
// but there won't be any further win_line() call to re-fix the
@@ -2647,7 +2647,7 @@
#ifdef FEAT_SEARCH_EXTRA
start_search_hl();
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
// Update popup_mask if needed.
may_update_popup_mask(must_redraw);
#endif
@@ -2763,7 +2763,7 @@
)
win_redr_status(wp, FALSE);
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
// Display popup windows on top of everything.
update_popups(win_update);
#endif
diff --git a/src/edit.c b/src/edit.c
index e1bf63d..4f53333 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -1417,7 +1417,7 @@
/* Trigger CursorMoved if the cursor moved. Not when the popup menu is
* visible, the command might delete it. */
if (ready && (has_cursormovedI()
-# ifdef FEAT_TEXT_PROP
+# ifdef FEAT_PROP_POPUP
|| popup_visible
# endif
# if defined(FEAT_CONCEAL)
@@ -1442,7 +1442,7 @@
update_curswant();
ins_apply_autocmds(EVENT_CURSORMOVEDI);
}
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (popup_visible)
popup_check_cursor_pos();
#endif
@@ -3775,7 +3775,7 @@
cc = replace_pop();
if (cc > 0)
{
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
size_t len_before = 0; // init to shut up GCC
if (curbuf->b_has_textprop)
@@ -3835,7 +3835,7 @@
// mark the buffer as changed and prepare for displaying
changed_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col);
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (curbuf->b_has_textprop)
{
size_t len_now = STRLEN(ml_get_curline());
@@ -4807,7 +4807,7 @@
}
/*
- * Delete upto starting point, start of line or previous word.
+ * Delete up to starting point, start of line or previous word.
*/
else
{
@@ -5609,7 +5609,7 @@
if ((State & REPLACE_FLAG) && !(State & VREPLACE_FLAG))
for (temp = i; --temp >= 0; )
replace_join(repl_off);
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
curbuf->b_ml.ml_line_len -= i;
#endif
}
diff --git a/src/eval.c b/src/eval.c
index b65f29e..c37d6fd 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -3890,7 +3890,7 @@
if (aucmd_win != NULL)
abort = abort || set_ref_in_item(&aucmd_win->w_winvar.di_tv, copyID,
NULL, NULL);
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
abort = abort || set_ref_in_item(&wp->w_winvar.di_tv, copyID,
NULL, NULL);
@@ -3954,7 +3954,7 @@
abort = abort || set_ref_in_term(copyID);
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
abort = abort || set_ref_in_popups(copyID);
#endif
diff --git a/src/evalbuffer.c b/src/evalbuffer.c
index a82b897..00185b1 100644
--- a/src/evalbuffer.c
+++ b/src/evalbuffer.c
@@ -565,7 +565,7 @@
dict_add_list(dict, "windows", windows);
}
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
// List of popup windows displaying this buffer
windows = list_alloc();
if (windows != NULL)
diff --git a/src/evalfunc.c b/src/evalfunc.c
index a071ad8..f6ea57c 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -584,7 +584,7 @@
#ifdef FEAT_PERL
{"perleval", 1, 1, FEARG_1, f_perleval},
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
{"popup_atcursor", 2, 2, FEARG_1, f_popup_atcursor},
{"popup_beval", 2, 2, FEARG_1, f_popup_beval},
{"popup_clear", 0, 0, 0, f_popup_clear},
@@ -616,7 +616,7 @@
{"prompt_setinterrupt", 2, 2, FEARG_1, f_prompt_setinterrupt},
{"prompt_setprompt", 2, 2, FEARG_1, f_prompt_setprompt},
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
{"prop_add", 3, 3, FEARG_1, f_prop_add},
{"prop_clear", 1, 3, FEARG_1, f_prop_clear},
{"prop_list", 1, 2, FEARG_1, f_prop_list},
@@ -3532,6 +3532,9 @@
"pythonx",
# endif
#endif
+#ifdef FEAT_PROP_POPUP
+ "popupwin",
+#endif
#ifdef FEAT_POSTSCRIPT
"postscript",
#endif
@@ -3608,7 +3611,7 @@
#ifdef FEAT_TEXTOBJ
"textobjects",
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
"textprop",
#endif
#ifdef HAVE_TGETENT
diff --git a/src/evalwindow.c b/src/evalwindow.c
index 7691693..34d202e 100644
--- a/src/evalwindow.c
+++ b/src/evalwindow.c
@@ -103,7 +103,7 @@
*tpp = tp;
return wp;
}
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
// popup windows are in separate lists
FOR_ALL_TABPAGES(tp)
for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next)
@@ -181,7 +181,7 @@
}
if (nr >= LOWEST_WIN_ID)
{
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
// check tab-local popup windows
for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next)
if (wp->w_id == nr)
@@ -199,6 +199,7 @@
/*
* Find a window: When using a Window ID in any tab page, when using a number
* in the current tab page.
+ * Returns NULL when not found.
*/
win_T *
find_win_by_nr_or_id(typval_T *vp)
@@ -1137,7 +1138,7 @@
curwin = save_curwin;
curbuf = curwin->w_buffer;
}
-# ifdef FEAT_TEXT_PROP
+# ifdef FEAT_PROP_POPUP
else if (WIN_IS_POPUP(curwin))
// original window was closed and now we're in a popup window: Go
// to the first valid window.
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 9576668..78f2bcc 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -2953,7 +2953,7 @@
topline = curwin->w_topline;
if (!oldbuf) /* need to read the file */
{
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
// Don't use the swap-exists dialog for a popup window, can't edit
// the buffer.
if (WIN_IS_POPUP(curwin))
@@ -2972,7 +2972,7 @@
(void)open_buffer(FALSE, eap, readfile_flags);
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
curbuf->b_flags &= ~BF_NO_SEA;
#endif
if (swap_exists_action == SEA_QUIT)
@@ -3016,7 +3016,7 @@
#ifdef FEAT_TITLE
maketitle();
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (WIN_IS_POPUP(curwin) && curwin->w_p_pvw && retval != FAIL)
popup_set_title(curwin);
#endif
@@ -3900,7 +3900,7 @@
int do_again; /* do it again after joining lines */
int skip_match = FALSE;
linenr_T sub_firstlnum; /* nr of first sub line */
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
int apc_flags = APC_SAVE_FOR_UNDO | APC_SUBSTITUTE;
colnr_T total_added = 0;
#endif
@@ -4317,7 +4317,7 @@
if (nmatch == 1)
{
p1 = sub_firstline;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (curbuf->b_has_textprop)
{
int bytes_added = sublen - 1 - (regmatch.endpos[0].col
@@ -4435,7 +4435,7 @@
if (p1[0] == '\\' && p1[1] != NUL) /* remove backslash */
{
STRMOVE(p1, p1 + 1);
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (curbuf->b_has_textprop)
{
// When text properties are changed, need to save
@@ -4464,7 +4464,7 @@
first_line = lnum;
last_line = lnum + 1;
}
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
adjust_props_for_split(lnum + 1, lnum, plen, 1);
#endif
// all line numbers increase
@@ -4993,7 +4993,7 @@
*/
if (!curwin->w_p_pvw)
{
-# ifdef FEAT_TEXT_PROP
+# ifdef FEAT_PROP_POPUP
if (use_previewpopup && *p_pvp != NUL)
{
wp = popup_find_preview_window();
@@ -5028,7 +5028,7 @@
/*
* There is no preview window open yet. Create one.
*/
-# ifdef FEAT_TEXT_PROP
+# ifdef FEAT_PROP_POPUP
if ((use_previewpopup && *p_pvp != NUL)
|| use_popup != USEPOPUP_NONE)
return popup_create_preview_window(use_popup != USEPOPUP_NONE);
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index ed7512f..677387f 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -368,7 +368,7 @@
#if !defined(FEAT_X11) || !defined(FEAT_XCLIPBOARD)
# define ex_xrestore ex_ni
#endif
-#if !defined(FEAT_TEXT_PROP)
+#if !defined(FEAT_PROP_POPUP)
# define ex_popupclear ex_ni
#endif
@@ -5013,7 +5013,7 @@
ex_win_close(eap->forceit, win, NULL);
return;
}
-# ifdef FEAT_TEXT_PROP
+# ifdef FEAT_PROP_POPUP
// Also when 'previewpopup' is empty, it might have been cleared.
popup_close_preview();
# endif
@@ -7812,7 +7812,7 @@
redraw_later(VALID);
win_enter(curwin_save, TRUE);
}
-# ifdef FEAT_TEXT_PROP
+# ifdef FEAT_PROP_POPUP
else if (WIN_IS_POPUP(curwin))
{
// can't keep focus in popup window
diff --git a/src/feature.h b/src/feature.h
index c4c276c..d0bb78f 100644
--- a/src/feature.h
+++ b/src/feature.h
@@ -1151,10 +1151,10 @@
#endif
/*
- * +textprop Text properties and popup windows
+ * +textprop and +popupwin Text PROPerties and POPUP windows
*/
#if defined(FEAT_EVAL) && defined(FEAT_SYN_HL)
-# define FEAT_TEXT_PROP
+# define FEAT_PROP_POPUP
#endif
#if defined(FEAT_SYN_HL) && defined(FEAT_RELTIME)
@@ -1167,7 +1167,7 @@
* +signs Allow signs to be displayed to the left of text lines.
* Adds the ":sign" command.
*/
-#if defined(FEAT_BIG) || defined(FEAT_NETBEANS_INTG) || defined(FEAT_TEXT_PROP)
+#if defined(FEAT_BIG) || defined(FEAT_NETBEANS_INTG) || defined(FEAT_PROP_POPUP)
# define FEAT_SIGNS
# if ((defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) \
&& defined(HAVE_X11_XPM_H)) \
diff --git a/src/fileio.c b/src/fileio.c
index 6f8c8f9..802b997 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1078,7 +1078,7 @@
* We allocate as much space for the file as we can get, plus
* space for the old line plus room for one terminating NUL.
* The amount is limited by the fact that read() only can read
- * upto max_unsigned characters (and other things).
+ * up to max_unsigned characters (and other things).
*/
if (!skip_read)
{
@@ -3366,7 +3366,7 @@
}
status_redraw_all();
redraw_tabline = TRUE;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
popup_update_preview_title();
#endif
}
diff --git a/src/getchar.c b/src/getchar.c
index a3af879..d8d498e 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -1604,7 +1604,7 @@
#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
|| im_is_preediting()
#endif
-#if defined(FEAT_TEXT_PROP)
+#if defined(FEAT_PROP_POPUP)
|| popup_no_mapping()
#endif
)
@@ -1822,7 +1822,7 @@
ui_remove_balloon();
}
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (popup_do_filter(c))
{
if (c == Ctrl_C)
@@ -2038,7 +2038,7 @@
if (win == NULL)
return;
(void)mouse_comp_pos(win, &row, &col, &lnum, NULL);
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (WIN_IS_POPUP(win))
winnr = 0;
else
@@ -2851,7 +2851,7 @@
/*
* get a character: 2. from the typeahead buffer
*/
- c = typebuf.tb_buf[typebuf.tb_off] & 255;
+ c = typebuf.tb_buf[typebuf.tb_off];
if (advance) /* remove chars from tb_buf */
{
cmd_silent = (typebuf.tb_silent > 0);
diff --git a/src/globals.h b/src/globals.h
index e96800d..77a42d8 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -95,7 +95,7 @@
*/
EXTERN short *TabPageIdxs INIT(= NULL);
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
// Array with size Rows x Columns containing zindex of popups.
EXTERN short *popup_mask INIT(= NULL);
EXTERN short *popup_mask_next INIT(= NULL);
@@ -640,7 +640,7 @@
EXTERN win_T *aucmd_win; // window used in aucmd_prepbuf()
EXTERN int aucmd_win_used INIT(= FALSE); // aucmd_win is being used
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
EXTERN win_T *first_popupwin; // first global popup window
EXTERN win_T *popup_dragwin INIT(= NULL); // popup window being dragged
diff --git a/src/gui.c b/src/gui.c
index 5f86cc9..3e5eff5 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -4898,7 +4898,7 @@
// apply 'mousefocus' and pointer shape
gui_mouse_focus(x, y);
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (popup_visible)
// Generate a mouse-moved event, so that the popup can perhaps be
// closed, just like in the terminal.
@@ -5152,7 +5152,7 @@
/* Trigger CursorMoved if the cursor moved. */
if (!finish_op && (has_cursormoved()
-# ifdef FEAT_TEXT_PROP
+# ifdef FEAT_PROP_POPUP
|| popup_visible
# endif
# ifdef FEAT_CONCEAL
@@ -5162,7 +5162,7 @@
{
if (has_cursormoved())
apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, FALSE, curbuf);
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (popup_visible)
popup_check_cursor_pos();
#endif
diff --git a/src/gui_w32.c b/src/gui_w32.c
index d5dfeff..d094be6 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -4255,7 +4255,7 @@
wp = gui_mouse_window(FIND_POPUP);
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (wp != NULL && popup_is_popup(wp))
{
cmdarg_T cap;
diff --git a/src/indent.c b/src/indent.c
index 70bb81b..32f1e12 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -773,7 +773,7 @@
// at the start of the indent (replacing spaces with TAB)
saved_cursor.col = (colnr_T)(s - newline);
}
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
{
int added = ind_len - (colnr_T)(p - oldline);
diff --git a/src/insexpand.c b/src/insexpand.c
index 121e6ec..4f96174 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -1811,7 +1811,7 @@
|| c == K_MOUSELEFT || c == K_MOUSERIGHT)
return retval;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
// Ignore mouse events in a popup window
if (is_mouse_key(c))
{
diff --git a/src/macros.h b/src/macros.h
index 72fc26a..ca7e4b5 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -339,7 +339,7 @@
#define IS_USER_CMDIDX(idx) ((int)(idx) < 0)
// Give an error in curwin is a popup window and evaluate to TRUE.
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
# define ERROR_IF_POPUP_WINDOW error_if_popup_window()
#else
# define ERROR_IF_POPUP_WINDOW 0
diff --git a/src/main.c b/src/main.c
index 103c53c..387f837 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1283,7 +1283,7 @@
/* Trigger CursorMoved if the cursor moved. */
if (!finish_op && (
has_cursormoved()
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
|| popup_visible
#endif
#ifdef FEAT_CONCEAL
@@ -1295,7 +1295,7 @@
if (has_cursormoved())
apply_autocmds(EVENT_CURSORMOVED, NULL, NULL,
FALSE, curbuf);
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (popup_visible)
popup_check_cursor_pos();
#endif
diff --git a/src/memline.c b/src/memline.c
index 32cbb7e..1c24b59 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -2705,7 +2705,7 @@
return (curbuf->b_ml.ml_flags & ML_LINE_DIRTY);
}
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
static void
add_text_props_for_append(
buf_T *buf,
@@ -2789,7 +2789,7 @@
DATA_BL *dp;
PTR_BL *pp;
infoptr_T *ip;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
char_u *tofree = NULL;
#endif
int ret = FAIL;
@@ -2803,7 +2803,7 @@
if (len == 0)
len = (colnr_T)STRLEN(line) + 1; // space needed for the text
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (curbuf->b_has_textprop && lnum > 0)
// Add text properties that continue from the previous line.
add_text_props_for_append(buf, lnum, &line, &len, &tofree);
@@ -3280,7 +3280,7 @@
ret = OK;
theend:
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
vim_free(tofree);
#endif
return ret;
@@ -3409,7 +3409,7 @@
if (copy)
{
// copy the line to allocated memory
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (has_props)
line = vim_memsave(line, len);
else
@@ -3432,14 +3432,14 @@
ml_flush_line(curbuf);
curbuf->b_ml.ml_flags &= ~ML_LINE_DIRTY;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (curbuf->b_has_textprop && !has_props)
// Need to fetch the old line to copy over any text properties.
ml_get_buf(curbuf, lnum, TRUE);
#endif
}
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (curbuf->b_has_textprop && !has_props)
{
size_t oldtextlen = STRLEN(curbuf->b_ml.ml_line_ptr) + 1;
@@ -3475,7 +3475,7 @@
return OK;
}
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
/*
* Adjust text properties in line "lnum" for a deleted line.
* When "above" is true this is the line above the deleted line.
@@ -3614,7 +3614,7 @@
long line_size;
int i;
int ret = FAIL;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
char_u *textprop_save = NULL;
int textprop_save_len;
#endif
@@ -3671,7 +3671,7 @@
if (netbeans_active())
netbeans_removed(buf, lnum, 0, (long)line_size);
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
// If there are text properties, make a copy, so that we can update
// properties in preceding and following lines.
if (buf->b_has_textprop)
@@ -3772,7 +3772,7 @@
ret = OK;
theend:
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (textprop_save != NULL)
{
// Adjust text properties in the line above and below.
@@ -5559,7 +5559,7 @@
end_idx = count - 1;
linecnt += rest;
}
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (buf->b_has_textprop)
{
int i;
@@ -5768,7 +5768,7 @@
idx++;
}
}
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (buf->b_has_textprop)
{
int i;
diff --git a/src/misc2.c b/src/misc2.c
index 8903b0d..80731f0 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1148,7 +1148,7 @@
/* Clear cmdline history. */
p_hi = 0;
init_history();
-# ifdef FEAT_TEXT_PROP
+# ifdef FEAT_PROP_POPUP
clear_global_prop_types();
# endif
diff --git a/src/mouse.c b/src/mouse.c
index 9d0e394..c94f322 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -291,7 +291,7 @@
bevalexpr_due_set = TRUE;
}
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
popup_handle_mouse_moved();
#endif
return FALSE;
@@ -1104,7 +1104,7 @@
(long)(curwin->w_botline - curwin->w_topline));
else
scroll_redraw(dir, 3L);
-# ifdef FEAT_TEXT_PROP
+# ifdef FEAT_PROP_POPUP
if (WIN_IS_POPUP(curwin))
popup_set_firstline(curwin);
# endif
@@ -1500,7 +1500,7 @@
#ifdef FEAT_MENU
static int in_winbar = FALSE;
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
static int in_popup_win = FALSE;
static win_T *click_in_popup_win = NULL;
#endif
@@ -1530,7 +1530,7 @@
flags &= ~(MOUSE_FOCUS | MOUSE_DID_MOVE);
dragwin = NULL;
did_drag = FALSE;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (click_in_popup_win != NULL && popup_dragwin == NULL)
popup_close_for_mouse_click(click_in_popup_win);
@@ -1575,7 +1575,7 @@
if (cmdwin_type != 0 && row < curwin->w_winrow)
return IN_OTHER_WIN;
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
// Continue a modeless selection in a popup window or dragging it.
if (in_popup_win)
{
@@ -1623,7 +1623,7 @@
return IN_UNKNOWN;
dragwin = NULL;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
// Click in a popup window may start dragging or modeless selection,
// but not much else.
if (WIN_IS_POPUP(wp))
@@ -1824,7 +1824,7 @@
if (cmdwin_type != 0 && row < curwin->w_winrow)
return IN_OTHER_WIN;
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (in_popup_win)
{
if (popup_dragwin != NULL)
@@ -2014,7 +2014,7 @@
wp = mouse_find_win(&row, &col, FIND_POPUP);
if (wp == NULL)
return;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (WIN_IS_POPUP(wp) && !wp->w_has_scrollbar)
return;
#endif
@@ -2049,7 +2049,7 @@
cap->count0 = cap->count1;
nv_scroll_line(cap);
}
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (WIN_IS_POPUP(curwin))
popup_set_firstline(curwin);
#endif
@@ -2925,7 +2925,7 @@
frame_T *fp;
win_T *wp;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
win_T *pwp = NULL;
if (popup != IGNORE_POPUP)
@@ -2987,7 +2987,7 @@
return NULL;
}
-#if defined(NEED_VCOL2COL) || defined(FEAT_BEVAL) || defined(FEAT_TEXT_PROP) \
+#if defined(NEED_VCOL2COL) || defined(FEAT_BEVAL) || defined(FEAT_PROP_POPUP) \
|| defined(PROTO)
/*
* Convert a virtual (screen) column to a character column.
@@ -3039,7 +3039,7 @@
int left_off = 0;
int height = wp->w_height + wp->w_status_height;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (WIN_IS_POPUP(wp))
{
top_off = popup_top_extra(wp);
diff --git a/src/move.c b/src/move.c
index b010ef9..8e53d8b 100644
--- a/src/move.c
+++ b/src/move.c
@@ -1181,7 +1181,7 @@
curwin->w_valid |= VALID_WCOL|VALID_WROW|VALID_VIRTCOL;
}
-#if (defined(FEAT_EVAL) || defined(FEAT_TEXT_PROP)) || defined(PROTO)
+#if (defined(FEAT_EVAL) || defined(FEAT_PROP_POPUP)) || defined(PROTO)
/*
* Compute the screen position of text character at "pos" in window "wp"
* The resulting values are one-based, zero when character is not visible.
diff --git a/src/ops.c b/src/ops.c
index b2827b2..f269f35 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -828,7 +828,7 @@
/* replace the line */
ml_replace(lnum, newp, FALSE);
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (curbuf->b_has_textprop && n != 0)
adjust_prop_columns(lnum, bd.textcol, -n, 0);
#endif
@@ -1948,7 +1948,7 @@
int remove_comments = (use_formatoptions == TRUE)
&& has_format_option(FO_REMOVE_COMS);
int prev_was_comment;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
textprop_T **prop_lines = NULL;
int *prop_lengths = NULL;
#endif
@@ -2072,7 +2072,7 @@
cend = newp + sumsize;
*cend = 0;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
// We need to move properties of the lines that are going to be deleted to
// the new long one.
if (curbuf->b_has_textprop && !text_prop_frozen)
@@ -2114,7 +2114,7 @@
(long)(cend - newp - spaces_removed), spaces_removed);
if (t == 0)
break;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (prop_lines != NULL)
adjust_props_for_join(curwin->w_cursor.lnum + t,
prop_lines + t - 1, prop_lengths + t - 1,
@@ -2129,7 +2129,7 @@
currsize = (int)STRLEN(curr);
}
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (prop_lines != NULL)
join_prop_lines(curwin->w_cursor.lnum, newp,
prop_lines, prop_lengths, count);
diff --git a/src/option.h b/src/option.h
index 8319e0f..4ccf22a 100644
--- a/src/option.h
+++ b/src/option.h
@@ -567,7 +567,7 @@
EXTERN int p_fs; // 'fsync'
#endif
EXTERN int p_gd; // 'gdefault'
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
# ifdef FEAT_QUICKFIX
EXTERN char_u *p_cpp; // 'completepopup'
# endif
diff --git a/src/optiondefs.h b/src/optiondefs.h
index 881ec06..8fda8bf 100644
--- a/src/optiondefs.h
+++ b/src/optiondefs.h
@@ -688,7 +688,7 @@
{(char_u *)"menu,preview", (char_u *)0L}
SCTX_INIT},
{"completepopup", "cpp", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
-#if defined(FEAT_TEXT_PROP) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_PROP_POPUP) && defined(FEAT_QUICKFIX)
(char_u *)&p_cpp, PV_NONE,
{(char_u *)"", (char_u *)0L}
#else
@@ -1897,7 +1897,7 @@
#endif
{(char_u *)12L, (char_u *)0L} SCTX_INIT},
{"previewpopup", "pvp", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
(char_u *)&p_pvp, PV_NONE,
{(char_u *)"", (char_u *)0L}
#else
diff --git a/src/optionstr.c b/src/optionstr.c
index b63a351..98e90a4 100644
--- a/src/optionstr.c
+++ b/src/optionstr.c
@@ -2220,7 +2220,7 @@
}
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
// 'previewpopup'
else if (varp == &p_pvp)
{
diff --git a/src/popupmenu.c b/src/popupmenu.c
index 11dd186..f11ae94 100644
--- a/src/popupmenu.c
+++ b/src/popupmenu.c
@@ -429,7 +429,7 @@
/ (pum_size - pum_height);
}
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
// The popup menu is drawn over popup menus with zindex under
// POPUPMENU_ZINDEX.
screen_zindex = POPUPMENU_ZINDEX;
@@ -616,12 +616,12 @@
++row;
}
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
screen_zindex = 0;
#endif
}
-#if defined(FEAT_TEXT_PROP) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_PROP_POPUP) && defined(FEAT_QUICKFIX)
/*
* Position the info popup relative to the popup menu item.
*/
@@ -683,7 +683,7 @@
#ifdef FEAT_QUICKFIX
int prev_selected = pum_selected;
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
int has_info = FALSE;
#endif
@@ -758,12 +758,12 @@
win_T *curwin_save = curwin;
tabpage_T *curtab_save = curtab;
int res = OK;
-# ifdef FEAT_TEXT_PROP
+# ifdef FEAT_PROP_POPUP
use_popup_T use_popup;
# else
# define use_popup USEPOPUP_NONE
# endif
-# ifdef FEAT_TEXT_PROP
+# ifdef FEAT_PROP_POPUP
has_info = TRUE;
if (strstr((char *)p_cot, "popuphidden") != NULL)
use_popup = USEPOPUP_HIDDEN;
@@ -787,7 +787,7 @@
g_do_tagpreview = 0;
if (curwin->w_p_pvw
-# ifdef FEAT_TEXT_PROP
+# ifdef FEAT_PROP_POPUP
|| (curwin->w_popup_flags & POPF_INFO)
# endif
)
@@ -862,7 +862,7 @@
curbuf->b_p_ma = FALSE;
if (pum_selected != prev_selected)
{
-# ifdef FEAT_TEXT_PROP
+# ifdef FEAT_PROP_POPUP
curwin->w_firstline = 1;
# endif
curwin->w_topline = 1;
@@ -871,7 +871,7 @@
curwin->w_topline = curbuf->b_ml.ml_line_count;
curwin->w_cursor.lnum = curwin->w_topline;
curwin->w_cursor.col = 0;
-# ifdef FEAT_TEXT_PROP
+# ifdef FEAT_PROP_POPUP
if (use_popup != USEPOPUP_NONE)
{
pum_position_info_popup(curwin);
@@ -916,13 +916,13 @@
if (!resized && win_valid(curwin_save))
{
-# ifdef FEAT_TEXT_PROP
+# ifdef FEAT_PROP_POPUP
win_T *wp = curwin;
# endif
++no_u_sync;
win_enter(curwin_save, TRUE);
--no_u_sync;
-# ifdef FEAT_TEXT_PROP
+# ifdef FEAT_PROP_POPUP
if (use_popup == USEPOPUP_HIDDEN && win_valid(wp))
popup_hide(wp);
# endif
@@ -937,7 +937,7 @@
}
}
}
-# if defined(FEAT_TEXT_PROP) && defined(FEAT_QUICKFIX)
+# if defined(FEAT_PROP_POPUP) && defined(FEAT_QUICKFIX)
if (WIN_IS_POPUP(curwin))
// can't keep focus in a popup window
win_enter(firstwin, TRUE);
@@ -945,7 +945,7 @@
}
#endif
}
-#if defined(FEAT_TEXT_PROP) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_PROP_POPUP) && defined(FEAT_QUICKFIX)
if (!has_info)
// hide any popup info window
popup_hide_info();
@@ -967,7 +967,7 @@
redraw_all_later(NOT_VALID);
redraw_tabline = TRUE;
status_redraw_all();
-#if defined(FEAT_TEXT_PROP) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_PROP_POPUP) && defined(FEAT_QUICKFIX)
// hide any popup info window
popup_hide_info();
#endif
diff --git a/src/popupwin.c b/src/popupwin.c
index e1c21ac..5385296 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -13,7 +13,7 @@
#include "vim.h"
-#if defined(FEAT_TEXT_PROP) || defined(PROTO)
+#if defined(FEAT_PROP_POPUP) || defined(PROTO)
typedef struct {
char *pp_name;
@@ -3864,4 +3864,4 @@
popup_set_title(wp);
}
-#endif // FEAT_TEXT_PROP
+#endif // FEAT_PROP_POPUP
diff --git a/src/proto.h b/src/proto.h
index 9d46b2b..fe9e2b3 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -216,7 +216,7 @@
# if defined(HAVE_TGETENT) && (defined(AMIGA) || defined(VMS))
# include "termlib.pro"
# endif
-# ifdef FEAT_TEXT_PROP
+# ifdef FEAT_PROP_POPUP
# include "popupwin.pro"
# include "textprop.pro"
# endif
@@ -257,7 +257,7 @@
# ifndef FEAT_BEVAL
# define BalloonEval int
# endif
-# if defined(FEAT_BEVAL) || defined(FEAT_TEXT_PROP)
+# if defined(FEAT_BEVAL) || defined(FEAT_PROP_POPUP)
# include "beval.pro"
# endif
diff --git a/src/screen.c b/src/screen.c
index 763d7a8..4a70295 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -108,7 +108,7 @@
if (*wp->w_p_wcr != NUL)
wcr_attr = syn_name2attr(wp->w_p_wcr);
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
else if (WIN_IS_POPUP(wp))
{
if (wp->w_popup_flags & POPF_INFO)
@@ -348,7 +348,7 @@
}
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
/*
* Return TRUE if this position has a higher level popup or this cell is
* transparent in the current popup.
@@ -460,7 +460,7 @@
}
#endif /* FEAT_RIGHTLEFT */
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
// First char of a popup window may go on top of the right half of a
// double-wide character. Clear the left half to avoid it getting the popup
// window background color.
@@ -499,7 +499,7 @@
redraw_this = TRUE;
}
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (blocked_by_popup(row, col + coloff))
redraw_this = FALSE;
#endif
@@ -744,7 +744,7 @@
}
if (clear_width > 0
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
&& !(flags & SLF_POPUP) // no separator for popup window
#endif
)
@@ -753,7 +753,7 @@
// right of the window contents. But not on top of a popup window.
if (coloff + col < Columns)
{
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (!blocked_by_popup(row, col + coloff))
#endif
{
@@ -1586,7 +1586,7 @@
|| exmode_active;
if ((need_redraw || force_redraw_this)
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
&& !blocked_by_popup(row, col)
#endif
)
@@ -2031,12 +2031,12 @@
// Skip if under the popup menu.
// Popup windows with zindex higher than POPUPMENU_ZINDEX go on top.
if (pum_under_menu(row, col)
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
&& screen_zindex <= POPUPMENU_ZINDEX
#endif
)
return;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (blocked_by_popup(row, col))
return;
#endif
@@ -2338,7 +2338,7 @@
|| force_next
#endif
)
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
// Skip if under a(nother) popup.
&& !blocked_by_popup(row, col)
#endif
@@ -2479,7 +2479,7 @@
unsigned *new_LineOffset;
char_u *new_LineWraps;
short *new_TabPageIdxs;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
short *new_popup_mask;
short *new_popup_mask_next;
char *new_popup_transparent;
@@ -2540,7 +2540,7 @@
win_free_lsize(wp);
if (aucmd_win != NULL)
win_free_lsize(aucmd_win);
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
// global popup windows
for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
win_free_lsize(wp);
@@ -2565,7 +2565,7 @@
new_LineOffset = LALLOC_MULT(unsigned, Rows);
new_LineWraps = LALLOC_MULT(char_u, Rows);
new_TabPageIdxs = LALLOC_MULT(short, Columns);
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
new_popup_mask = LALLOC_MULT(short, Rows * Columns);
new_popup_mask_next = LALLOC_MULT(short, Rows * Columns);
new_popup_transparent = LALLOC_MULT(char, Rows * Columns);
@@ -2582,7 +2582,7 @@
if (aucmd_win != NULL && aucmd_win->w_lines == NULL
&& win_alloc_lines(aucmd_win) == FAIL)
outofmem = TRUE;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
// global popup windows
for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
if (win_alloc_lines(wp) == FAIL)
@@ -2612,7 +2612,7 @@
|| new_LineOffset == NULL
|| new_LineWraps == NULL
|| new_TabPageIdxs == NULL
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
|| new_popup_mask == NULL
|| new_popup_mask_next == NULL
|| new_popup_transparent == NULL
@@ -2637,7 +2637,7 @@
VIM_CLEAR(new_LineOffset);
VIM_CLEAR(new_LineWraps);
VIM_CLEAR(new_TabPageIdxs);
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
VIM_CLEAR(new_popup_mask);
VIM_CLEAR(new_popup_mask_next);
VIM_CLEAR(new_popup_transparent);
@@ -2715,7 +2715,7 @@
/* Use the last line of the screen for the current line. */
current_ScreenLine = new_ScreenLines + Rows * Columns;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
vim_memset(new_popup_mask, 0, Rows * Columns * sizeof(short));
vim_memset(new_popup_transparent, 0, Rows * Columns * sizeof(char));
#endif
@@ -2734,7 +2734,7 @@
LineOffset = new_LineOffset;
LineWraps = new_LineWraps;
TabPageIdxs = new_TabPageIdxs;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
popup_mask = new_popup_mask;
popup_mask_next = new_popup_mask_next;
popup_transparent = new_popup_transparent;
@@ -2803,7 +2803,7 @@
VIM_CLEAR(LineOffset);
VIM_CLEAR(LineWraps);
VIM_CLEAR(TabPageIdxs);
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
VIM_CLEAR(popup_mask);
VIM_CLEAR(popup_mask_next);
VIM_CLEAR(popup_transparent);
@@ -2948,7 +2948,7 @@
|| cterm_normal_bg_color == 0
#endif
|| *T_UT != NUL)
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
&& !(p == T_CE && popup_visible)
#endif
);
@@ -3412,7 +3412,7 @@
return FAIL;
}
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
// this doesn't work when there are popups visible
if (popup_visible)
return FAIL;
@@ -3544,7 +3544,7 @@
|| (clip_star.state != SELECT_CLEARED
&& redrawing_for_callback > 0)
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
|| popup_visible
#endif
)
diff --git a/src/search.c b/src/search.c
index ed4ea0d..3f34588 100644
--- a/src/search.c
+++ b/src/search.c
@@ -2863,7 +2863,7 @@
while (count--)
{
/*
- * if on an empty line, skip upto a non-empty line
+ * if on an empty line, skip up to a non-empty line
*/
if (gchar_pos(&pos) == NUL)
{
@@ -5724,7 +5724,7 @@
redraw_later(VALID);
win_enter(curwin_save, TRUE);
}
-# ifdef FEAT_TEXT_PROP
+# ifdef FEAT_PROP_POPUP
else if (WIN_IS_POPUP(curwin))
// can't keep focus in popup window
win_enter(firstwin, TRUE);
diff --git a/src/sign.c b/src/sign.c
index f3a1f9d..71f21b0 100644
--- a/src/sign.c
+++ b/src/sign.c
@@ -496,7 +496,7 @@
break;
if (sign->se_lnum == lnum
-# ifdef FEAT_TEXT_PROP
+# ifdef FEAT_PROP_POPUP
&& sign_group_for_window(sign, wp)
# endif
)
@@ -2656,7 +2656,7 @@
{
sign_entry_T *sign = wp->w_buffer->b_signlist;
-# ifdef FEAT_TEXT_PROP
+# ifdef FEAT_PROP_POPUP
while (sign != NULL && !sign_group_for_window(sign, wp))
sign = sign->se_next;
# endif
diff --git a/src/structs.h b/src/structs.h
index d851a27..3e5be69 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -2119,7 +2119,7 @@
// # define CRYPT_NOT_INPLACE 1
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
typedef enum {
POPPOS_BOTLEFT,
POPPOS_TOPLEFT,
@@ -2615,7 +2615,7 @@
listener_T *b_listener;
list_T *b_recorded_changes;
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
int b_has_textprop; // TRUE when text props were added
hashtab_T *b_proptypes; // text property types local to buffer
#endif
@@ -2768,7 +2768,7 @@
win_T *tp_prevwin; // previous window in this Tab page
win_T *tp_firstwin; // first window in this Tab page
win_T *tp_lastwin; // last window in this Tab page
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
win_T *tp_first_popupwin; // first popup window in this Tab page
#endif
long tp_old_Rows; // Rows when Tab page was left
@@ -3020,7 +3020,7 @@
int w_width; // Width of window, excluding separation.
int w_vsep_width; // Number of separator columns (0 or 1).
pos_save_T w_save_cursor; // backup of cursor pos and topline
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
int w_popup_flags; // POPF_ values
int w_popup_handled; // POPUP_HANDLE[0-9] flags
char_u *w_popup_title;
diff --git a/src/tag.c b/src/tag.c
index 040325c..5f02ea6 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -3678,7 +3678,7 @@
win_close(curwin, FALSE);
postponed_split = 0;
}
-#if defined(FEAT_QUICKFIX) && defined(FEAT_TEXT_PROP)
+#if defined(FEAT_QUICKFIX) && defined(FEAT_PROP_POPUP)
else if (WIN_IS_POPUP(curwin))
{
win_T *wp = curwin;
@@ -3689,7 +3689,7 @@
}
#endif
}
-#if defined(FEAT_QUICKFIX) && defined(FEAT_TEXT_PROP)
+#if defined(FEAT_QUICKFIX) && defined(FEAT_PROP_POPUP)
if (WIN_IS_POPUP(curwin))
// something went wrong, still in popup, but it can't have focus
win_enter(firstwin, TRUE);
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim
index 9372d53..f0cc1ab 100644
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -177,7 +177,7 @@
au SwapExists * call HandleSwapExists()
" Close any stray popup windows
- if has('textprop')
+ if has('popupwin')
call popup_clear()
endif
diff --git a/src/testdir/test_execute_func.vim b/src/testdir/test_execute_func.vim
index 2f02409..c2d504f 100644
--- a/src/testdir/test_execute_func.vim
+++ b/src/testdir/test_execute_func.vim
@@ -90,7 +90,7 @@
let line = win_execute(otherwin, 'echo getline(1)')
call assert_match('the new window', line)
- if has('textprop')
+ if has('popupwin')
let popupwin = popup_create('the popup win', {'line': 2, 'col': 3})
redraw
let line = 'echo getline(1)'->win_execute(popupwin)
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index 653ee49..9ecd245 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -1,7 +1,7 @@
" Tests for popup windows
source check.vim
-CheckFeature textprop
+CheckFeature popupwin
source screendump.vim
diff --git a/src/testdir/test_popupwin_textprop.vim b/src/testdir/test_popupwin_textprop.vim
index b112755..1b339d4 100644
--- a/src/testdir/test_popupwin_textprop.vim
+++ b/src/testdir/test_popupwin_textprop.vim
@@ -1,6 +1,7 @@
" Tests for popup windows for text properties
source check.vim
+CheckFeature popupwin
CheckFeature textprop
source screendump.vim
diff --git a/src/textprop.c b/src/textprop.c
index 55844d3..fa3830c 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -28,7 +28,7 @@
#include "vim.h"
-#if defined(FEAT_TEXT_PROP) || defined(PROTO)
+#if defined(FEAT_PROP_POPUP) || defined(PROTO)
/*
* In a hashtable item "hi_key" points to "pt_name" in a proptype_T.
@@ -1309,4 +1309,4 @@
vim_free(prop_lengths);
}
-#endif // FEAT_TEXT_PROP
+#endif // FEAT_PROP_POPUP
diff --git a/src/ui.c b/src/ui.c
index 1eaaec3..628ba0c 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -1079,7 +1079,7 @@
clip_start_selection(int col, int row, int repeated_click)
{
Clipboard_T *cb = &clip_star;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
win_T *wp;
int row_cp = row;
int col_cp = col;
@@ -1103,7 +1103,7 @@
cb->end = cb->start;
cb->origin_row = (short_u)cb->start.lnum;
cb->state = SELECT_IN_PROGRESS;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (wp != NULL && WIN_IS_POPUP(wp))
{
// Click in a popup window restricts selection to that window,
@@ -1455,7 +1455,7 @@
int invert = FALSE;
int max_col;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
max_col = cbd->max_col - 1;
#else
max_col = Columns - 1;
@@ -1526,7 +1526,7 @@
int height = height_arg;
int width = width_arg;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
// this goes on top of all popup windows
screen_zindex = CLIP_ZINDEX;
@@ -1551,7 +1551,7 @@
else
#endif
screen_draw_rectangle(row, col, height, width, invert);
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
screen_zindex = 0;
#endif
}
@@ -1594,7 +1594,7 @@
{
row = col1; col1 = col2; col2 = row;
}
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (col1 < clip_star.min_col)
col1 = clip_star.min_col;
if (col2 > clip_star.max_col)
@@ -1629,7 +1629,7 @@
if (row == row1)
start_col = col1;
else
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
start_col = clip_star.min_col;
#else
start_col = 0;
@@ -1638,7 +1638,7 @@
if (row == row2)
end_col = col2;
else
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
end_col = clip_star.max_col;
#else
end_col = Columns;
@@ -1648,7 +1648,7 @@
/* See if we need to nuke some trailing whitespace */
if (end_col >=
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
clip_star.max_col
#else
Columns
@@ -1814,7 +1814,7 @@
if (row >= screen_Rows || ScreenLines == NULL)
return 0;
for (i =
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
cbd->max_col;
#else
screen_Columns;
diff --git a/src/version.c b/src/version.c
index f2c26bb..281fafc 100644
--- a/src/version.c
+++ b/src/version.c
@@ -472,6 +472,11 @@
#else
"-persistent_undo",
#endif
+#ifdef FEAT_PROP_POPUP
+ "+popupwin",
+#else
+ "-popupwin",
+#endif
#ifdef FEAT_PRINTER
# ifdef FEAT_POSTSCRIPT
"+postscript",
@@ -614,7 +619,7 @@
#else
"-textobjects",
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
"+textprop",
#else
"-textprop",
@@ -738,6 +743,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2371,
+/**/
2370,
/**/
2369,
diff --git a/src/vim.h b/src/vim.h
index b7f7387..19c19de 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -653,7 +653,7 @@
#define POPUP_HANDLED_4 0x08 // used by may_update_popup_mask()
#define POPUP_HANDLED_5 0x10 // used by update_popups()
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
# define WIN_IS_POPUP(wp) ((wp)->w_popup_flags != 0)
#else
# define WIN_IS_POPUP(wp) 0
@@ -2072,7 +2072,7 @@
short_u origin_end_col;
short_u word_start_col;
short_u word_end_col;
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
// limits for selection inside a popup window
short_u min_col;
short_u max_col;
diff --git a/src/window.c b/src/window.c
index a1cda83..85312ba 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1426,7 +1426,7 @@
int
win_valid_popup(win_T *win UNUSED)
{
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
win_T *wp;
for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
@@ -1473,7 +1473,7 @@
if (wp == win)
return TRUE;
}
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next)
if (wp == win)
return TRUE;
@@ -2525,7 +2525,7 @@
out_flush();
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (popup_win_closed(win) && !win_valid(win))
return FAIL;
#endif
@@ -2761,7 +2761,7 @@
(void)win_free_mem(aucmd_win, &dummy, NULL);
aucmd_win = NULL;
}
-# ifdef FEAT_TEXT_PROP
+# ifdef FEAT_PROP_POPUP
close_all_popups();
# endif
@@ -3778,7 +3778,7 @@
# ifdef FEAT_DIFF
diff_clear(tp);
# endif
-# ifdef FEAT_TEXT_PROP
+# ifdef FEAT_PROP_POPUP
while (tp->tp_first_popupwin != NULL)
popup_close_tabpage(tp, tp->tp_first_popupwin->w_id);
#endif
@@ -4686,7 +4686,7 @@
/* set window height to desired minimal value */
if (curwin->w_height < p_wh && !curwin->w_p_wfh
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
&& !popup_is_popup(curwin)
#endif
)
@@ -4952,7 +4952,7 @@
#ifdef FEAT_MENU
remove_winbar(wp);
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
free_callback(&wp->w_close_cb);
free_callback(&wp->w_filter_cb);
for (i = 0; i < 4; ++i)
@@ -4991,7 +4991,7 @@
return wp == aucmd_win || WIN_IS_POPUP(wp);
}
-#if defined(FEAT_TEXT_PROP) || defined(PROTO)
+#if defined(FEAT_PROP_POPUP) || defined(PROTO)
/*
* Free a popup window. This does not take the window out of the window list
* and assumes there is only one toplevel frame, no split.