]> granicus.if.org Git - vim/commitdiff
patch 8.1.2371: FEAT_TEXT_PROP is a confusing name v8.1.2371
authorBram Moolenaar <Bram@vim.org>
Sat, 30 Nov 2019 21:48:27 +0000 (22:48 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 30 Nov 2019 21:48:27 +0000 (22:48 +0100)
Problem:    FEAT_TEXT_PROP is a confusing name.
Solution:   Use FEAT_PROP_POPUP. (Naruhiko Nishino, closes #5291)

47 files changed:
src/beval.c
src/buffer.c
src/change.c
src/drawline.c
src/drawscreen.c
src/edit.c
src/eval.c
src/evalbuffer.c
src/evalfunc.c
src/evalwindow.c
src/ex_cmds.c
src/ex_docmd.c
src/feature.h
src/fileio.c
src/getchar.c
src/globals.h
src/gui.c
src/gui_w32.c
src/indent.c
src/insexpand.c
src/macros.h
src/main.c
src/memline.c
src/misc2.c
src/mouse.c
src/move.c
src/ops.c
src/option.h
src/optiondefs.h
src/optionstr.c
src/popupmenu.c
src/popupwin.c
src/proto.h
src/screen.c
src/search.c
src/sign.c
src/structs.h
src/tag.c
src/testdir/runtest.vim
src/testdir/test_execute_func.vim
src/testdir/test_popupwin.vim
src/testdir/test_popupwin_textprop.vim
src/textprop.c
src/ui.c
src/version.c
src/vim.h
src/window.c

index 1bc31a17a9438f5e141a463265aa1d8c124a8e22..63aaf1376c1c55f34b1c45e33979a3f8888a378c 100644 (file)
@@ -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
index 4868428f52531bb545363092c53825d584d0dcd4..4f38f918f03e45f71e648a868c3aa5fc4ce19301 100644 (file)
@@ -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
index d0462dbe1cdd27f57028859f409d19ddd8b363a4..f2dfc9371e68810233b663e2e2426410cc0d3f38 100644 (file)
@@ -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,
index 189ed80acc4cee3b6ee7fd8ae8ae55a370ff3c05..95ade68b26ca1725f719ffca9d8947759341f882 100644 (file)
@@ -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
index de0fc6b974583edb63250cbbdfb9863e01569d48..3a88ee979477a15a40c03cf30d10e0ba8c1861ae 100644 (file)
@@ -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
index e1bf63db9317ab274c5fca275ddf26d5360bbbba..4f53333cdef7b5932562e07745fb6cd84bd3f63d 100644 (file)
@@ -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
            }
index b65f29efcaf66b3cefaa796451e552719ac9026c..c37d6fdc20e5bc42da992d3cab7a5d9a9cfe67a7 100644 (file)
@@ -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
 
index a82b89727e0c1104fc66cdb7c631fc08f0c28cf1..00185b108ae87f8768149425b1fb63facf616deb 100644 (file)
@@ -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)
index a071ad8b654bce4aae791dd7a8d742a846ae7826..f6ea57c6306992e43be64b5e70a0bb947c034b76 100644 (file)
@@ -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
index 76916936dce272142ce8ee1fcb3aabdd0bd04650..34d202e0ad7712a53d4ef3566c8dc0d79cb910d1 100644 (file)
@@ -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.
index 95766683c8fcc9fd5a0629ab331f08dad2312c53..78f2bcc6b2b24c20beaf9bbe2a77def020762130 100644 (file)
@@ -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);
index ed7512f7698d86c6374a6bc41f111a23c364390d..677387f93b8b6cc92c9bfc6f676e7bff2af2c57b 100644 (file)
@@ -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
index c4c276c6788a0c1435651133e6b766855315715e..d0bb78fc9f1b61f28c58df7a2f0dfe024860a0d8 100644 (file)
 #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)
  * +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)) \
index 6f8c8f991d7cd33890e3e9730e1addb588952c9e..802b997ac5da7be61931e82fb34e2fb5769f3d6e 100644 (file)
@@ -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
 }
index a3af879991023cdf986528c400a40429cc7f658d..d8d498e7d93785a933058f4f035aeb5ede82d090 100644 (file)
@@ -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);
index e96800db094ee456fa0519e2e660d4ddeae7b275..77a42d8ef6548427bdee7e599cb14af67f63b738 100644 (file)
@@ -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
 
index 5f86cc9294b62297f834cb7e5f26d136745552c4..3e5eff5d8a9f4fb5f0af70857a9e29b3fcce7f7e 100644 (file)
--- 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
index d5dfeff685282b2370595f431037003b22f48a20..d094be6be3fcc831f9373c5bf4abe052894ece1a 100644 (file)
@@ -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;
index 70bb81b0dbe738fa179ebaf20027df44759c7933..32f1e12248de3b9479411b9778337b72120837b9 100644 (file)
@@ -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);
 
index 121e6ec52d93eb11ac5500809028b97b82434173..4f961744a5d351174b3ad06b34141426c38bd11e 100644 (file)
@@ -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))
     {
index 72fc26af0ef6d314a17e85953d7f692e0e18e292..ca7e4b5d0b6a0fec0c8820b001eb12c797108ef2 100644 (file)
 #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
index 103c53c363dd0d4325e990288ba40075d6c2c7c8..387f8370fab8f79691fe2a5f5fa03c3f6529bf68 100644 (file)
@@ -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
index 32cbb7e526a9ac628a2d2687709577f15e347e91..1c24b59af70549a88b16bb586d39b70d03ecd873 100644 (file)
@@ -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;
index 8903b0d06b5c77d12869d84758408c66b78a2964..80731f02ae8300d14ce32ee85ea12c74ac4b09f3 100644 (file)
@@ -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
 
index 9d0e39409d2d717d21aac538ca8767113dd0ab4c..c94f3228f133e9436d85241deba0ee90a686f824 100644 (file)
@@ -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);
index b010ef936938e0ec84eeaee06dbd20e8cca9fc33..8e53d8bcb063f74a8fd657c316e8a75f0346da8d 100644 (file)
@@ -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.
index b2827b263c121763973989cf242ba48ff5f5a765..f269f35b95acbb7d1a8857c347d834f9cf82b5ed 100644 (file)
--- 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);
index 8319e0f187fb694318ccb41fdb89d88d84c06e3b..4ccf22a87d97e42ce48fa2d7825f40c15382a274 100644 (file)
@@ -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
index 881ec06a5e04f398462fc204a5b919936d533e4b..8fda8bff8caec87f52e64fb0a861c2ef22097e34 100644 (file)
@@ -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
index b63a351c63719a31f1e63fe6f9311e2b54127f19..98e90a4536c9bead109d4d0d5b0a3ceb274dd87c 100644 (file)
@@ -2220,7 +2220,7 @@ did_set_string_option(
     }
 #endif
 
-#ifdef FEAT_TEXT_PROP
+#ifdef FEAT_PROP_POPUP
     // 'previewpopup'
     else if (varp == &p_pvp)
     {
index 11dd1865f4076efc3c0363c42b5b792f12851bdb..f11ae943a26149d5e846fa00d29007a0bfe215f1 100644 (file)
@@ -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
index e1c21acb289fab9e263a91ca7fda2e7eaa7737bf..5385296a3dbe82fc6f43a83be1a4bbc25cad83e3 100644 (file)
@@ -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
index 9d46b2b2becb172116842f7a58cc9eb55798f013..fe9e2b3b8dfe570d98e6df264f6e9e01005d3720 100644 (file)
@@ -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
 
index 763d7a82fe2159da133784cf4429079f69abc6c2..4a702951871a3c0ab8bafe3c6e30ef696e48c766 100644 (file)
@@ -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
             )
index ed4ea0d5f0589ec265b0e924c5df3423f482b189..3f345888a8edac832e1ef0fdd8a7d7fa89711369 100644 (file)
@@ -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);
index f3a1f9df9e916eb5f0579fb53c0c76147f003fb3..71f21b0c731efea04d1587095df8b4ef6d4f3faf 100644 (file)
@@ -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
index d851a277195d1d878ca96aca06beb4c086131f50..3e5be6911ba33d3019e4b849a5051476d940b8a2 100644 (file)
@@ -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;
index 040325c6278991682fe2df7011df1a9f20e3dee2..5f02ea67f60bba9457390b52e1a0b1c040809530 100644 (file)
--- 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);
index 9372d53640d7e4789f6d4f5a3b0995a7626c0daa..f0cc1abff32ca96577639c22f5a617d92c34f856 100644 (file)
@@ -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
 
index 2f02409dea06b8646e25ac4de2e2552157e414f5..c2d504fe145e2d10728ee4d9c716edd6d93df63d 100644 (file)
@@ -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)
index 653ee49d9e530f3f835fb117284aad98fe4c0112..9ecd2459a12c76b4ff114be75b76fcc9c459de77 100644 (file)
@@ -1,7 +1,7 @@
 " Tests for popup windows
 
 source check.vim
-CheckFeature textprop
+CheckFeature popupwin
 
 source screendump.vim
 
index b1127557cab9dba5fc085494d99f7c7cede53c6c..1b339d44d8f1a82be3b2acb0cd0b8f0a0fcdc823 100644 (file)
@@ -1,6 +1,7 @@
 " Tests for popup windows for text properties
 
 source check.vim
+CheckFeature popupwin
 CheckFeature textprop
 
 source screendump.vim
index 55844d3ba226253366b6b648e52c80f410fed623..fa3830cb20f9ba60f52c697ec8d7c37f4ddabc97 100644 (file)
@@ -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
index 1eaaec3f24ce010c4221a8fa790b2b270dac337b..628ba0c491dbfbd578514d9c29d73f4610ac4298 100644 (file)
--- 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;
index f2c26bbc2ccfad15cb69cedd5736246e7ec4cc9d..281fafc7d1f6f6f3f54355df318bde569d9067aa 100644 (file)
@@ -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",
@@ -737,6 +742,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2371,
 /**/
     2370,
 /**/
index b7f738798ef8a4fa256bdde7a9979d960b37bffa..19c19de6543baabae75cc15372006ab5163a4576 100644 (file)
--- 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;
index a1cda8304d790cdbcfbf2e6a284396b74e68e4c5..85312ba2883b34a0e362acd37c26e54e4e4e0c32 100644 (file)
@@ -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.