summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/beval.c2
-rw-r--r--src/buffer.c4
-rw-r--r--src/change.c6
-rw-r--r--src/drawline.c14
-rw-r--r--src/drawscreen.c12
-rw-r--r--src/edit.c12
-rw-r--r--src/eval.c4
-rw-r--r--src/evalbuffer.c2
-rw-r--r--src/evalfunc.c9
-rw-r--r--src/evalwindow.c7
-rw-r--r--src/ex_cmds.c18
-rw-r--r--src/ex_docmd.c6
-rw-r--r--src/feature.h6
-rw-r--r--src/fileio.c4
-rw-r--r--src/getchar.c8
-rw-r--r--src/globals.h4
-rw-r--r--src/gui.c6
-rw-r--r--src/gui_w32.c2
-rw-r--r--src/indent.c2
-rw-r--r--src/insexpand.c2
-rw-r--r--src/macros.h2
-rw-r--r--src/main.c4
-rw-r--r--src/memline.c26
-rw-r--r--src/misc2.c2
-rw-r--r--src/mouse.c24
-rw-r--r--src/move.c2
-rw-r--r--src/ops.c10
-rw-r--r--src/option.h2
-rw-r--r--src/optiondefs.h4
-rw-r--r--src/optionstr.c2
-rw-r--r--src/popupmenu.c28
-rw-r--r--src/popupwin.c4
-rw-r--r--src/proto.h4
-rw-r--r--src/screen.c44
-rw-r--r--src/search.c4
-rw-r--r--src/sign.c4
-rw-r--r--src/structs.h8
-rw-r--r--src/tag.c4
-rw-r--r--src/testdir/runtest.vim2
-rw-r--r--src/testdir/test_execute_func.vim2
-rw-r--r--src/testdir/test_popupwin.vim2
-rw-r--r--src/testdir/test_popupwin_textprop.vim1
-rw-r--r--src/textprop.c4
-rw-r--r--src/ui.c20
-rw-r--r--src/version.c9
-rw-r--r--src/vim.h4
-rw-r--r--src/window.c16
47 files changed, 190 insertions, 178 deletions
diff --git a/src/beval.c b/src/beval.c
index 1bc31a17a..63aaf1376 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 4868428f5..4f38f918f 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -861,7 +861,7 @@ buf_freeall(buf_T *buf, int flags)
#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 @@ buf_spname(buf_T *buf)
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 d0462dbe1..f2dfc9371 100644
--- a/src/change.c
+++ b/src/change.c
@@ -698,7 +698,7 @@ changed_bytes(linenr_T lnum, colnr_T col)
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 @@ del_bytes(
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 @@ open_line(
)
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 189ed80ac..95ade68b2 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -182,7 +182,7 @@ get_sign_display_info(
}
#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 @@ win_line(
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 @@ win_line(
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 @@ win_line(
}
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
{
char_u *prop_start;
@@ -1347,7 +1347,7 @@ win_line(
}
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
if (text_props != NULL)
{
int pi;
@@ -1472,7 +1472,7 @@ win_line(
# 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 @@ win_line(
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 de0fc6b97..3a88ee979 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -149,7 +149,7 @@ update_screen(int type_arg)
}
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 @@ update_screen(int type_arg)
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 @@ win_update(win_T *wp)
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 @@ win_update(win_T *wp)
!= (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 @@ update_prepare(void)
#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 @@ updateWindow(win_T *wp)
)
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 e1bf63db9..4f53333cd 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -1417,7 +1417,7 @@ ins_redraw(int ready) // not busy with something
/* 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 @@ ins_redraw(int ready) // not busy with something
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 @@ replace_do_bs(int limit_col)
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 @@ replace_do_bs(int limit_col)
// 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 @@ ins_bs(
}
/*
- * 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 @@ ins_tab(void)
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 b65f29efc..c37d6fdc2 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -3890,7 +3890,7 @@ garbage_collect(int testing)
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 @@ garbage_collect(int testing)
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 a82b89727..00185b108 100644
--- a/src/evalbuffer.c
+++ b/src/evalbuffer.c
@@ -565,7 +565,7 @@ get_buffer_info(buf_T *buf)
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 a071ad8b6..f6ea57c63 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -584,7 +584,7 @@ static funcentry_T global_functions[] =
#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 @@ static funcentry_T global_functions[] =
{"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 @@ f_has(typval_T *argvars, typval_T *rettv)
"pythonx",
# endif
#endif
+#ifdef FEAT_PROP_POPUP
+ "popupwin",
+#endif
#ifdef FEAT_POSTSCRIPT
"postscript",
#endif
@@ -3608,7 +3611,7 @@ f_has(typval_T *argvars, typval_T *rettv)
#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 76916936d..34d202e0a 100644
--- a/src/evalwindow.c
+++ b/src/evalwindow.c
@@ -103,7 +103,7 @@ win_id2wp_tp(int id, tabpage_T **tpp)
*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 @@ find_win_by_nr(
}
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_win_by_nr(
/*
* 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 @@ restore_win_noblock(
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 95766683c..78f2bcc6b 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -2953,7 +2953,7 @@ do_ecmd(
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 @@ do_ecmd(
(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 @@ do_ecmd(
#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 @@ do_sub(exarg_T *eap)
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 @@ do_sub(exarg_T *eap)
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 @@ do_sub(exarg_T *eap)
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 @@ do_sub(exarg_T *eap)
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 @@ prepare_tagpreview(
*/
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 @@ prepare_tagpreview(
/*
* 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 ed7512f76..677387f93 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -368,7 +368,7 @@ static void ex_folddo(exarg_T *eap);
#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_pclose(exarg_T *eap)
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 @@ ex_pedit(exarg_T *eap)
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 c4c276c67..d0bb78fc9 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 6f8c8f991..802b997ac 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1078,7 +1078,7 @@ retry:
* 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 @@ shorten_fnames(int force)
}
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 a3af87999..d8d498e7d 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -1604,7 +1604,7 @@ vgetc(void)
#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 @@ vgetc(void)
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 @@ f_getchar(typval_T *argvars, typval_T *rettv)
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 @@ vgetorpeek(int advance)
/*
* 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 e96800db0..77a42d8ef 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -95,7 +95,7 @@ EXTERN int redrawing_for_callback INIT(= 0);
*/
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 *curwin; // currently active window
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 5f86cc929..3e5eff5d8 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -4898,7 +4898,7 @@ gui_mouse_moved(int x, int y)
// 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 @@ gui_update_screen(void)
/* 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 @@ gui_update_screen(void)
{
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 d5dfeff68..d094be6be 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -4255,7 +4255,7 @@ _OnMouseWheel(
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 70bb81b0d..32f1e1224 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -773,7 +773,7 @@ set_indent(
// 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 121e6ec52..4f961744a 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -1811,7 +1811,7 @@ ins_compl_prep(int c)
|| 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 72fc26af0..ca7e4b5d0 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 103c53c36..387f8370f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1283,7 +1283,7 @@ main_loop(
/* 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 @@ main_loop(
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 32cbb7e52..1c24b59af 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -2705,7 +2705,7 @@ ml_line_alloced(void)
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 @@ ml_append_int(
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 @@ ml_append_int(
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 @@ ml_append_int(
ret = OK;
theend:
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
vim_free(tofree);
#endif
return ret;
@@ -3409,7 +3409,7 @@ ml_replace_len(
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_replace_len(
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 @@ ml_replace_len(
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 @@ ml_delete_int(buf_T *buf, linenr_T lnum, int message)
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 @@ ml_delete_int(buf_T *buf, linenr_T lnum, int message)
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 @@ ml_delete_int(buf_T *buf, linenr_T lnum, int message)
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 @@ ml_updatechunk(
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 @@ ml_find_line_or_offset(buf_T *buf, linenr_T lnum, long *offp)
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 8903b0d06..80731f02a 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1148,7 +1148,7 @@ free_all_mem(void)
/* 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 9d0e39409..c94f3228f 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -291,7 +291,7 @@ do_mouse(
bevalexpr_due_set = TRUE;
}
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
popup_handle_mouse_moved();
#endif
return FALSE;
@@ -1104,7 +1104,7 @@ ins_mousescroll(int dir)
(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 @@ jump_to_mouse(
#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 @@ jump_to_mouse(
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 @@ retnomove:
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 @@ retnomove:
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 @@ retnomove:
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 @@ nv_mousescroll(cmdarg_T *cap)
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 @@ nv_mousescroll(cmdarg_T *cap)
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 @@ mouse_find_win(int *rowp, int *colp, mouse_find_T popup UNUSED)
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 @@ mouse_find_win(int *rowp, int *colp, mouse_find_T popup UNUSED)
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 @@ f_getmousepos(typval_T *argvars UNUSED, typval_T *rettv)
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 b010ef936..8e53d8bcb 100644
--- a/src/move.c
+++ b/src/move.c
@@ -1181,7 +1181,7 @@ curs_columns(
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 b2827b263..f269f35b9 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -828,7 +828,7 @@ op_delete(oparg_T *oap)
/* 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 @@ do_join(
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 @@ do_join(
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 @@ do_join(
(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 @@ do_join(
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 8319e0f18..4ccf22a87 100644
--- a/src/option.h
+++ b/src/option.h
@@ -567,7 +567,7 @@ EXTERN char_u *p_fp; // 'formatprg'
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 881ec06a5..8fda8bff8 100644
--- a/src/optiondefs.h
+++ b/src/optiondefs.h
@@ -688,7 +688,7 @@ static struct vimoption options[] =
{(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 @@ static struct vimoption options[] =
#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 b63a351c6..98e90a453 100644
--- a/src/optionstr.c
+++ b/src/optionstr.c
@@ -2220,7 +2220,7 @@ did_set_string_option(
}
#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 11dd1865f..f11ae943a 100644
--- a/src/popupmenu.c
+++ b/src/popupmenu.c
@@ -429,7 +429,7 @@ pum_redraw(void)
/ (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 @@ pum_redraw(void)
++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 @@ pum_set_selected(int n, int repeat UNUSED)
#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 @@ pum_set_selected(int n, int repeat UNUSED)
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 @@ pum_set_selected(int n, int repeat UNUSED)
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 @@ pum_set_selected(int n, int repeat UNUSED)
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 @@ pum_set_selected(int n, int repeat UNUSED)
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 @@ pum_set_selected(int n, int repeat UNUSED)
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 @@ pum_set_selected(int n, int repeat UNUSED)
}
}
}
-# 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 @@ pum_set_selected(int n, int repeat UNUSED)
}
#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 @@ pum_undisplay(void)
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 e1c21acb2..5385296a3 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_update_preview_title(void)
popup_set_title(wp);
}
-#endif // FEAT_TEXT_PROP
+#endif // FEAT_PROP_POPUP
diff --git a/src/proto.h b/src/proto.h
index 9d46b2b2b..fe9e2b3b8 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -216,7 +216,7 @@ void mbyte_im_set_active(int active_arg);
# 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 @@ void mbyte_im_set_active(int active_arg);
# 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 763d7a82f..4a7029518 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -108,7 +108,7 @@ get_wcr_attr(win_T *wp)
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 @@ screen_get_current_line_off()
}
#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 @@ screen_line(
}
#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 @@ screen_line(
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 @@ screen_line(
}
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 @@ screen_line(
// 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 @@ screen_puts_len(
|| 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 @@ screen_char(unsigned off, int row, int col)
// 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 @@ screen_fill(
|| 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 @@ screenalloc(int doclear)
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 @@ retry:
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 @@ retry:
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 @@ retry:
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 @@ give_up:
|| 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 @@ give_up:
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 @@ give_up:
/* 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 @@ give_up:
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 @@ free_screenlines(void)
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 @@ can_clear(char_u *p)
|| 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 @@ win_do_lines(
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 @@ screen_ins_lines(
|| (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 ed4ea0d5f..3f345888a 100644
--- a/src/search.c
+++ b/src/search.c
@@ -2863,7 +2863,7 @@ findsent(int dir, long count)
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 @@ search_line:
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 f3a1f9df9..71f21b0c7 100644
--- a/src/sign.c
+++ b/src/sign.c
@@ -496,7 +496,7 @@ buf_get_signattrs(win_T *wp, linenr_T lnum, sign_attrs_T *sattr)
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 @@ get_first_valid_sign(win_T *wp)
{
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 d851a2771..3e5be6911 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -2119,7 +2119,7 @@ typedef struct {
// # define CRYPT_NOT_INPLACE 1
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
typedef enum {
POPPOS_BOTLEFT,
POPPOS_TOPLEFT,
@@ -2615,7 +2615,7 @@ struct file_buffer
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 @@ struct tabpage_S
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 @@ struct window_S
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 040325c62..5f02ea67f 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -3678,7 +3678,7 @@ jumpto_tag(
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 @@ jumpto_tag(
}
#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 9372d5364..f0cc1abff 100644
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -177,7 +177,7 @@ func RunTheTest(test)
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 2f02409de..c2d504fe1 100644
--- a/src/testdir/test_execute_func.vim
+++ b/src/testdir/test_execute_func.vim
@@ -90,7 +90,7 @@ func Test_win_execute()
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 653ee49d9..9ecd2459a 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 b1127557c..1b339d44d 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 55844d3ba..fa3830cb2 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 @@ join_prop_lines(
vim_free(prop_lengths);
}
-#endif // FEAT_TEXT_PROP
+#endif // FEAT_PROP_POPUP
diff --git a/src/ui.c b/src/ui.c
index 1eaaec3f2..628ba0c49 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -1079,7 +1079,7 @@ clip_compare_pos(
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 @@ clip_start_selection(int col, int row, int repeated_click)
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 @@ clip_invert_area(
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 @@ clip_invert_rectangle(
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 @@ clip_invert_rectangle(
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 @@ clip_copy_modeless_selection(int both UNUSED)
{
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 @@ clip_copy_modeless_selection(int both UNUSED)
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 @@ clip_copy_modeless_selection(int both UNUSED)
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 @@ clip_copy_modeless_selection(int both UNUSED)
/* 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 @@ clip_get_line_end(Clipboard_T *cbd UNUSED, int row)
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 f2c26bbc2..281fafc7d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -472,6 +472,11 @@ static char *(features[]) =
#else
"-persistent_undo",
#endif
+#ifdef FEAT_PROP_POPUP
+ "+popupwin",
+#else
+ "-popupwin",
+#endif
#ifdef FEAT_PRINTER
# ifdef FEAT_POSTSCRIPT
"+postscript",
@@ -614,7 +619,7 @@ static char *(features[]) =
#else
"-textobjects",
#endif
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
"+textprop",
#else
"-textprop",
@@ -738,6 +743,8 @@ static char *(features[]) =
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 b7f738798..19c19de65 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -653,7 +653,7 @@ extern int (*dyn_libintl_wputenv)(const wchar_t *envstring);
#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 @@ typedef struct
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 a1cda8304..85312ba28 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1426,7 +1426,7 @@ win_init_some(win_T *newp, win_T *oldp)
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 @@ win_valid_any_tab(win_T *win)
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 @@ win_close(win_T *win, int free_buf)
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 @@ win_free_all(void)
(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 @@ free_tabpage(tabpage_T *tp)
# 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 @@ win_enter_ext(
/* 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 @@ win_free(
#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 @@ win_unlisted(win_T *wp)
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.