]> granicus.if.org Git - vim/commitdiff
patch 9.0.0747: too many #ifdefs v9.0.0747
authorMartin Tournoij <martin@arp242.net>
Thu, 13 Oct 2022 21:12:15 +0000 (22:12 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 13 Oct 2022 21:12:15 +0000 (22:12 +0100)
Problem:    Too many #ifdefs.
Solution:   Gradudate the +cmdline_info feature. (Martin Tournoij,
            closes #11330)

25 files changed:
runtime/doc/options.txt
runtime/doc/various.txt
src/arglist.c
src/buffer.c
src/charset.c
src/digraph.c
src/drawline.c
src/drawscreen.c
src/edit.c
src/errors.h
src/evalfunc.c
src/feature.h
src/getchar.c
src/message.c
src/normal.c
src/option.c
src/option.h
src/optiondefs.h
src/screen.c
src/spell.c
src/spellsuggest.c
src/structs.h
src/terminal.c
src/version.c
src/window.c

index ee6e5da201c45f75738e19181e468b1d2e23e97b..6f479bdc95341e45649ad026efd8ecdc9e89741c 100644 (file)
@@ -6476,8 +6476,6 @@ A jump table for the options with a short description can be found at |Q_op|.
                                         *'ruler'* *'ru'* *'noruler'* *'noru'*
 'ruler' 'ru'           boolean (default off, set in |defaults.vim|)
                        global
-                       {not available when compiled without the
-                       |+cmdline_info| feature}
        Show the line and column number of the cursor position, separated by a
        comma.  When there is room, the relative position of the displayed
        text in the file is shown on the far right:
@@ -7137,8 +7135,6 @@ A jump table for the options with a short description can be found at |Q_op|.
 'showcmd' 'sc'         boolean (Vim default: on, off for Unix,
                                       Vi default: off, set in |defaults.vim|)
                        global
-                       {not available when compiled without the
-                       |+cmdline_info| feature}
        Show (partial) command in the last line of the screen.  Set this
        option off if your terminal is slow.
        In Visual mode the size of the selected area is shown:
index 469e84c3b73d02750d0a588220323f87606d95a7..6a6c3b666bc5eb15111d0d323cb2cdbf493c1baa 100644 (file)
@@ -355,7 +355,8 @@ N  *+clientserver*  Unix and Win32: Remote invocation |clientserver|
    *+clipboard_working*        |clipboard| support compiled-in and working
 T  *+cmdline_compl*    command line completion |cmdline-completion|
 T  *+cmdline_hist*     command line history |cmdline-history|
-N  *+cmdline_info*     |'showcmd'| and |'ruler'|
+T  *+cmdline_info*     |'showcmd'| and |'ruler'|; Always enabled since
+                       9.0.0747
 T  *+cmdwin*           |cmdline-window| support; Always enabled since 9.0.0657
 T  *+comments*         |'comments'| support
 N  *+conceal*          "conceal" support, see |conceal| |:syn-conceal| etc.
index 4c64d2ab547895fdc642087c357f71aa4500f0d6..bc51cded1f84918034b11486244bb8931627363a 100644 (file)
@@ -295,7 +295,7 @@ get_arglist(garray_T *gap, char_u *str, int escaped)
     return OK;
 }
 
-#if defined(FEAT_QUICKFIX) || defined(FEAT_SYN_HL) || defined(PROTO)
+#if defined(FEAT_QUICKFIX) || defined(FEAT_SYN_HL) || defined(FEAT_SPELL) || defined(PROTO)
 /*
  * Parse a list of arguments (file names), expand them and return in
  * "fnames[fcountp]".  When "wig" is TRUE, removes files matching 'wildignore'.
index b589894b7e1ec95520d2a5f2f7b39f6e9443100a..5f8512ae92f4860c810326f540d43c52c94e3406 100644 (file)
@@ -2543,7 +2543,7 @@ buflist_getfpos(void)
     }
 }
 
-#if defined(FEAT_QUICKFIX) || defined(FEAT_EVAL) || defined(PROTO)
+#if defined(FEAT_QUICKFIX) || defined(FEAT_EVAL) || defined(FEAT_SPELL) || defined(PROTO)
 /*
  * Find file in buffer list by name (it has to be for the current window).
  * Returns NULL if not found.
@@ -3846,14 +3846,12 @@ fileinfo(
                                            (long)curbuf->b_ml.ml_line_count);
     if (curbuf->b_ml.ml_flags & ML_EMPTY)
        vim_snprintf_add(buffer, IOSIZE, "%s", _(no_lines_msg));
-#ifdef FEAT_CMDL_INFO
     else if (p_ru)
        // Current line and column are already on the screen -- webb
        vim_snprintf_add(buffer, IOSIZE,
                NGETTEXT("%ld line --%d%%--", "%ld lines --%d%%--",
                                                   curbuf->b_ml.ml_line_count),
                (long)curbuf->b_ml.ml_line_count, n);
-#endif
     else
     {
        vim_snprintf_add(buffer, IOSIZE,
@@ -5177,8 +5175,6 @@ build_stl_str_hl(
 }
 #endif // FEAT_STL_OPT
 
-#if defined(FEAT_STL_OPT) || defined(FEAT_CMDL_INFO) \
-           || defined(FEAT_GUI_TABLINE) || defined(PROTO)
 /*
  * Get relative cursor position in window into "buf[buflen]", in the form 99%,
  * using "Top", "Bot" or "All" when appropriate.
@@ -5213,7 +5209,6 @@ get_rel_pos(
                                    ? (int)(above / ((above + below) / 100L))
                                    : (int)(above * 100L / (above + below)));
 }
-#endif
 
 /*
  * Append (file 2 of 8) to "buf[buflen]", if editing more than one file.
index d03f2616cd55e6879399ca2bd7b4f3894adb2671..c4db9f8cae3a31cf06b52b29ee14b8b5a84e4d25 100644 (file)
@@ -1085,7 +1085,7 @@ win_lbr_chartabsize(
        int             *headp UNUSED)
 {
     win_T      *wp = cts->cts_win;
-#ifdef FEAT_PROP_POPUP
+#if defined(FEAT_PROP_POPUP) || defined(FEAT_LINEBREAK)
     char_u     *line = cts->cts_line; // start of the line
 #endif
     char_u     *s = cts->cts_ptr;
index 5c7300113c0e21b2e56e3ff55d25573092674872..7902c0e893dc3aa1ad26c55824e80ac4e2fbcc97 100644 (file)
@@ -1546,10 +1546,8 @@ get_digraph(
                    )
                putcmdline(c, TRUE);
        }
-#ifdef FEAT_CMDL_INFO
        else
            add_to_showcmd(c);
-#endif
        ++no_mapping;
        ++allow_keys;
        cc = plain_vgetc();
index bc39442132e6217398ce67cd5354012bb7c67b12..b2a5951435cb6bf7a9342abbe00440a9a88b2f50 100644 (file)
@@ -1075,7 +1075,7 @@ win_line(
     int                get_term_attr = FALSE;
 #endif
 
-#ifdef FEAT_SYN_HL
+#if defined(FEAT_SYN_HL) || defined(FEAT_DIFF)
     // margin columns for the screen line, needed for when 'cursorlineopt'
     // contains "screenline"
     int                left_curline_col = 0;
@@ -1089,6 +1089,8 @@ win_line(
 
 #if defined(FEAT_CONCEAL) || defined(FEAT_SEARCH_EXTRA)
     int                match_conc      = 0;    // cchar for match functions
+#endif
+#if defined(FEAT_CONCEAL) || defined(FEAT_SEARCH_EXTRA) || defined(FEAT_LINEBREAK)
     int                on_last_col     = FALSE;
 #endif
 #ifdef FEAT_CONCEAL
index fe54ef5d8166db87765d20e91cc92560fa39837f..d55c2eaec42051962dedfaeb9f8d1a3dae839aa4 100644 (file)
@@ -547,9 +547,7 @@ win_redr_status(win_T *wp, int ignore_pum UNUSED)
            screen_puts(NameBuff, row, (int)(this_ru_col - STRLEN(NameBuff)
                                                   - 1 + wp->w_wincol), attr);
 
-#ifdef FEAT_CMDL_INFO
        win_redr_ruler(wp, TRUE, ignore_pum);
-#endif
     }
 
     /*
@@ -619,9 +617,7 @@ showruler(int always)
        redraw_custom_statusline(curwin);
     else
 #endif
-#ifdef FEAT_CMDL_INFO
        win_redr_ruler(curwin, always, FALSE);
-#endif
 
     if (need_maketitle
 #ifdef FEAT_STL_OPT
@@ -636,7 +632,6 @@ showruler(int always)
        draw_tabline();
 }
 
-#if defined(FEAT_CMDL_INFO) || defined(PROTO)
     void
 win_redr_ruler(win_T *wp, int always, int ignore_pum)
 {
@@ -816,7 +811,6 @@ win_redr_ruler(win_T *wp, int always, int ignore_pum)
 #endif
     }
 }
-#endif
 
 /*
  * To be called when "updating_screen" was set before and now the postponed
@@ -2924,10 +2918,7 @@ updateWindow(win_T *wp)
     if (redraw_tabline)
        draw_tabline();
 
-    if (wp->w_redr_status
-# ifdef FEAT_CMDL_INFO
-           || p_ru
-# endif
+    if (wp->w_redr_status || p_ru
 # ifdef FEAT_STL_OPT
            || *p_stl != NUL || *wp->w_p_stl != NUL
 # endif
index 755e2db5ef7c0e554e5ade3c746b5b6780364165..1aaac6277277b2a427a516596081166dc1b3b66b 100644 (file)
@@ -310,9 +310,7 @@ edit(
 #endif
 
     setmouse();
-#ifdef FEAT_CMDL_INFO
     clear_showcmd();
-#endif
 #ifdef FEAT_RIGHTLEFT
     // there is no reverse replace mode
     revins_on = (State == MODE_INSERT && p_ri);
@@ -1561,9 +1559,7 @@ ins_ctrl_v(void)
     }
     AppendToRedobuff((char_u *)CTRL_V_STR);    // CTRL-V
 
-#ifdef FEAT_CMDL_INFO
     add_to_showcmd_c(Ctrl_V);
-#endif
 
     // Do not change any modifyOtherKeys ESC sequence to a normal key for
     // CTRL-SHIFT-V.
@@ -1572,9 +1568,7 @@ ins_ctrl_v(void)
        // when the line fits in 'columns' the '^' is at the start of the next
        // line and will not removed by the redraw
        edit_unputchar();
-#ifdef FEAT_CMDL_INFO
     clear_showcmd();
-#endif
 
     insert_special(c, FALSE, TRUE);
 #ifdef FEAT_RIGHTLEFT
@@ -1907,10 +1901,8 @@ get_literal(int noReduceKeys)
            // character for i_CTRL-V_digit.
            break;
 
-#ifdef FEAT_CMDL_INFO
        if ((State & MODE_CMDLINE) == 0 && MB_BYTE2LEN_CHECK(nc) == 1)
            add_to_showcmd(nc);
-#endif
        if (nc == 'x' || nc == 'X')
            hex = TRUE;
        else if (nc == 'o' || nc == 'O')
@@ -3372,9 +3364,7 @@ ins_reg(void)
        ins_redraw(FALSE);
 
        edit_putchar('"', TRUE);
-#ifdef FEAT_CMDL_INFO
        add_to_showcmd_c(Ctrl_R);
-#endif
     }
 
 #ifdef USE_ON_FLY_SCROLL
@@ -3393,9 +3383,7 @@ ins_reg(void)
     {
        // Get a third key for literal register insertion
        literally = regname;
-#ifdef FEAT_CMDL_INFO
        add_to_showcmd_c(literally);
-#endif
        regname = plain_vgetc();
        LANGMAP_ADJUST(regname, TRUE);
     }
@@ -3463,9 +3451,7 @@ ins_reg(void)
        ins_need_undo = TRUE;
     u_sync_once = 0;
 #endif
-#ifdef FEAT_CMDL_INFO
     clear_showcmd();
-#endif
 
     // If the inserted register is empty, we need to remove the '"'
     if (need_redraw || stuff_empty())
@@ -5176,9 +5162,7 @@ ins_digraph(void)
 
        edit_putchar('?', TRUE);
        did_putchar = TRUE;
-#ifdef FEAT_CMDL_INFO
        add_to_showcmd_c(Ctrl_K);
-#endif
     }
 
 #ifdef USE_ON_FLY_SCROLL
@@ -5199,9 +5183,7 @@ ins_digraph(void)
 
     if (IS_SPECIAL(c) || mod_mask)         // special key
     {
-#ifdef FEAT_CMDL_INFO
        clear_showcmd();
-#endif
        insert_special(c, TRUE, FALSE);
        return NUL;
     }
@@ -5219,9 +5201,7 @@ ins_digraph(void)
                edit_putchar(c, TRUE);
                did_putchar = TRUE;
            }
-#ifdef FEAT_CMDL_INFO
            add_to_showcmd_c(c);
-#endif
        }
        ++no_mapping;
        ++allow_keys;
@@ -5236,15 +5216,11 @@ ins_digraph(void)
        {
            AppendToRedobuff((char_u *)CTRL_V_STR);
            c = digraph_get(c, cc, TRUE);
-#ifdef FEAT_CMDL_INFO
            clear_showcmd();
-#endif
            return c;
        }
     }
-#ifdef FEAT_CMDL_INFO
     clear_showcmd();
-#endif
     return NUL;
 }
 #endif
index 5a976deac2b2a19d315d7879c5d4d438ed69c78d..7aeca75aded65ace726f6fc155fd05e06b48ef39 100644 (file)
@@ -1907,7 +1907,7 @@ EXTERN char e_character_in_fol_low_or_upp_is_out_of_range[]
 EXTERN char e_word_characters_differ_between_spell_files[]
        INIT(= N_("E763: Word characters differ between spell files"));
 #endif
-#if defined(FEAT_SYN_HL) || defined(FEAT_COMPL_FUNC)
+#if defined(FEAT_SYN_HL) || defined(FEAT_COMPL_FUNC) || defined(FEAT_SPELL)
 EXTERN char e_option_str_is_not_set[]
        INIT(= N_("E764: Option '%s' is not set"));
 #endif
@@ -3082,7 +3082,7 @@ EXTERN char e_bool_required_for_argument_nr[]
 EXTERN char e_redefining_imported_item_str[]
        INIT(= N_("E1213: Redefining imported item \"%s\""));
 #endif
-#if defined(FEAT_DIGRAPHS) && defined(FEAT_EVAL)
+#if defined(FEAT_DIGRAPHS)
 EXTERN char e_digraph_must_be_just_two_characters_str[]
        INIT(= N_("E1214: Digraph must be just two characters: %s"));
 EXTERN char e_digraph_argument_must_be_one_character_str[]
index 07ea31178758db04bc4789b51a191da18adf3493..b769c08b470cb9bfd7251142d41a5908c8e1d342 100644 (file)
@@ -6091,20 +6091,8 @@ f_has(typval_T *argvars, typval_T *rettv)
 #endif
                },
        {"scrollbind", 1},
-       {"showcmd",
-#ifdef FEAT_CMDL_INFO
-               1
-#else
-               0
-#endif
-               },
-       {"cmdline_info",
-#ifdef FEAT_CMDL_INFO
-               1
-#else
-               0
-#endif
-               },
+       {"showcmd", 1},
+       {"cmdline_info", 1},
        {"signs",
 #ifdef FEAT_SIGNS
                1
@@ -10276,7 +10264,7 @@ f_synIDattr(typval_T *argvars UNUSED, typval_T *rettv)
                    p = highlight_has_attr(id, HL_ITALIC, modec);
                break;
 
-       case 'n':                                       
+       case 'n':
                if (TOLOWER_ASC(what[1]) == 'o')        // nocombine
                    p = highlight_has_attr(id, HL_NOCOMBINE, modec);
                else                                    // name
index 275fbe397c9f5b4659e84622f67ce63c857c67e8..948539b1b362c1b8169ee83fc4265d49d948c4b5 100644 (file)
  * +builtin_terms      all builtin termcap entries included
  * +float              Floating point variables.
  * +cmdwin             Command line window.
+ * +cmdline_info       'showcmd' and 'ruler' options.
  *
  * Obsolete:
  * +tag_old_static     Old style static tags: "file:tag  file  ..".
 # define VIM_BACKTICK          // internal backtick expansion
 #endif
 
-/*
- * +cmdline_info       'showcmd' and 'ruler' options.
- */
-#ifdef FEAT_NORMAL
-# define FEAT_CMDL_INFO
-#endif
-
 /*
  * +linebreak          'showbreak', 'breakat' and 'linebreak' options.
  *                     Also 'numberwidth'.
  */
 #ifdef FEAT_NORMAL
 # define FEAT_STL_OPT
-# ifndef FEAT_CMDL_INFO
-#  define FEAT_CMDL_INFO       // 'ruler' is required for 'statusline'
-# endif
 #endif
 
 /*
index d1d3fc6823325fcb32f9a57f05baab501c08beb3..1ed2fbf1a2dfda150c7c200df7490abc3b661ff8 100644 (file)
@@ -3077,9 +3077,7 @@ vgetorpeek(int advance)
                                        // 'ttimeoutlen' for complete key code
     int                mapdepth = 0;           // check for recursive mapping
     int                mode_deleted = FALSE;   // set when mode has been deleted
-#ifdef FEAT_CMDL_INFO
     int                new_wcol, new_wrow;
-#endif
 #ifdef FEAT_GUI
     int                shape_changed = FALSE;  // adjusted cursor shape
 #endif
@@ -3149,9 +3147,7 @@ vgetorpeek(int advance)
            {
                long    wait_time;
                int     keylen = 0;
-#ifdef FEAT_CMDL_INFO
                int     showcmd_idx;
-#endif
                check_end_reg_executing(advance);
                /*
                 * ui_breakcheck() is slow, don't use it too often when
@@ -3249,10 +3245,8 @@ vgetorpeek(int advance)
                 * place does not matter.
                 */
                c = 0;
-#ifdef FEAT_CMDL_INFO
                new_wcol = curwin->w_wcol;
                new_wrow = curwin->w_wrow;
-#endif
                if (       advance
                        && typebuf.tb_len == 1
                        && typebuf.tb_buf[typebuf.tb_off] == ESC
@@ -3351,10 +3345,8 @@ vgetorpeek(int advance)
                    }
                    setcursor();
                    out_flush();
-#ifdef FEAT_CMDL_INFO
                    new_wcol = curwin->w_wcol;
                    new_wrow = curwin->w_wrow;
-#endif
                    curwin->w_wcol = old_wcol;
                    curwin->w_wrow = old_wrow;
                }
@@ -3442,9 +3434,7 @@ vgetorpeek(int advance)
                 * input from the user), show the partially matched characters
                 * to the user with showcmd.
                 */
-#ifdef FEAT_CMDL_INFO
                showcmd_idx = 0;
-#endif
                c1 = 0;
                if (typebuf.tb_len > 0 && advance && !exmode_active)
                {
@@ -3462,7 +3452,6 @@ vgetorpeek(int advance)
                            setcursor(); // put cursor back where it belongs
                            c1 = 1;
                        }
-#ifdef FEAT_CMDL_INFO
                        // need to use the col and row from above here
                        old_wcol = curwin->w_wcol;
                        old_wrow = curwin->w_wrow;
@@ -3476,7 +3465,6 @@ vgetorpeek(int advance)
                               typebuf.tb_buf[typebuf.tb_off + showcmd_idx++]);
                        curwin->w_wcol = old_wcol;
                        curwin->w_wrow = old_wrow;
-#endif
                    }
 
                    // this looks nice when typing a dead character map
@@ -3521,10 +3509,8 @@ vgetorpeek(int advance)
                        typebuf.tb_buflen - typebuf.tb_off - typebuf.tb_len - 1,
                        wait_time);
 
-#ifdef FEAT_CMDL_INFO
                if (showcmd_idx != 0)
                    pop_showcmd();
-#endif
                if (c1 == 1)
                {
                    if (State & MODE_INSERT)
index fe02aed4d8199f431fe793a903841ec52d6aea52..d90666f0afac20dd5d1243eeb4ac74a8ff6e1053 100644 (file)
@@ -1774,7 +1774,7 @@ msg_outtrans_special(
     return retval;
 }
 
-#if defined(FEAT_EVAL) || defined(PROTO)
+#if defined(FEAT_EVAL) || defined(FEAT_SPELL) || defined(PROTO)
 /*
  * Return the lhs or rhs of a mapping, with the key codes turned into printable
  * strings, in an allocated string.
index 5c7bc2e9702123cb4c23c0801ab1995619ab4b72..a7c6d42aa9f0f782e98e66d2725a2bf58036f3d8 100644 (file)
@@ -20,9 +20,7 @@ static int    VIsual_mode_orig = NUL;         // saved Visual mode
 static void    set_vcount_ca(cmdarg_T *cap, int *set_prevcount);
 #endif
 static void    unshift_special(cmdarg_T *cap);
-#ifdef FEAT_CMDL_INFO
 static void    del_from_showcmd(int);
-#endif
 
 /*
  * nv_*(): functions called to handle Normal and Visual mode commands.
@@ -222,9 +220,7 @@ getcount:
            if (c == K_DEL || c == K_KDEL)
            {
                cap->count0 /= 10;
-#ifdef FEAT_CMDL_INFO
                del_from_showcmd(4);    // delete the digit and ~@%
-#endif
            }
            else if (cap->count0 > 99999999L)
            {
@@ -255,9 +251,7 @@ getcount:
                --no_mapping;
                --allow_keys;
            }
-#ifdef FEAT_CMDL_INFO
            *need_flushbuf |= add_to_showcmd(c);
-#endif
        }
 
        // If we got CTRL-W there may be a/another count
@@ -272,9 +266,7 @@ getcount:
            LANGMAP_ADJUST(c, TRUE);
            --no_mapping;
            --allow_keys;
-#ifdef FEAT_CMDL_INFO
            *need_flushbuf |= add_to_showcmd(c);
-#endif
            goto getcount;              // jump back
        }
     }
@@ -375,9 +367,7 @@ normal_cmd_get_more_chars(
         */
        cap->nchar = plain_vgetc();
        LANGMAP_ADJUST(cap->nchar, TRUE);
-#ifdef FEAT_CMDL_INFO
        *need_flushbuf |= add_to_showcmd(cap->nchar);
-#endif
        if (cap->nchar == 'r' || cap->nchar == '\'' || cap->nchar == '`'
                || cap->nchar == Ctrl_BSL)
        {
@@ -465,9 +455,7 @@ normal_cmd_get_more_chars(
        p_smd = save_smd;
 #endif
        State = MODE_NORMAL_BUSY;
-#ifdef FEAT_CMDL_INFO
        *need_flushbuf |= add_to_showcmd(*cp);
-#endif
 
        if (!lit)
        {
@@ -482,11 +470,9 @@ normal_cmd_get_more_chars(
                if (c > 0)
                {
                    *cp = c;
-# ifdef FEAT_CMDL_INFO
                    // Guessing how to update showcmd here...
                    del_from_showcmd(3);
                    *need_flushbuf |= add_to_showcmd(*cp);
-# endif
                }
            }
 #endif
@@ -789,9 +775,7 @@ normal_cmd(
     if (KeyTyped && !KeyStuffed)
        win_ensure_size();
 
-#ifdef FEAT_CMDL_INFO
     need_flushbuf = add_to_showcmd(c);
-#endif
 
     // Get the command count
     c = normal_cmd_get_count(&ca, c, toplevel, set_prevcount, &ctrl_w,
@@ -879,14 +863,13 @@ normal_cmd(
     if (normal_cmd_needs_more_chars(&ca, nv_cmds[idx].cmd_flags))
        idx = normal_cmd_get_more_chars(idx, &ca, &need_flushbuf);
 
-#ifdef FEAT_CMDL_INFO
     // Flush the showcmd characters onto the screen so we can see them while
     // the command is being executed.  Only do this when the shown command was
     // actually displayed, otherwise this will slow down a lot when executing
     // mappings.
     if (need_flushbuf)
        out_flush();
-#endif
+
     if (ca.cmdchar != K_IGNORE)
     {
        if (ex_normal_busy)
@@ -991,11 +974,9 @@ normal_end:
     }
 #endif
 
-#ifdef FEAT_CMDL_INFO
     if (oap->op_type == OP_NOP && oap->regname == 0
            && ca.cmdchar != K_CURSORHOLD)
        clear_showcmd();
-#endif
 
     checkpcmark();             // check if we moved since setting pcmark
     vim_free(ca.searchbuf);
@@ -1566,13 +1547,10 @@ may_clear_cmdline(void)
 {
     if (mode_displayed)
        clear_cmdline = TRUE;   // unshow visual mode later
-#ifdef FEAT_CMDL_INFO
     else
        clear_showcmd();
-#endif
 }
 
-#if defined(FEAT_CMDL_INFO) || defined(PROTO)
 /*
  * Routines for displaying a partly typed command
  */
@@ -1820,7 +1798,6 @@ display_showcmd(void)
 
     setcursor();           // put cursor back where it belongs
 }
-#endif
 
 /*
  * When "check" is FALSE, prepare for commands that scroll the window.
@@ -2550,9 +2527,8 @@ nv_z_get_count(cmdarg_T *cap, int *nchar_arg)
        LANGMAP_ADJUST(nchar, TRUE);
        --no_mapping;
        --allow_keys;
-#ifdef FEAT_CMDL_INFO
        (void)add_to_showcmd(nchar);
-#endif
+
        if (nchar == K_DEL || nchar == K_KDEL)
            n /= 10;
        else if (VIM_ISDIGIT(nchar))
@@ -2607,9 +2583,8 @@ nv_zg_zw(cmdarg_T *cap, int nchar)
        LANGMAP_ADJUST(nchar, TRUE);
        --no_mapping;
        --allow_keys;
-#ifdef FEAT_CMDL_INFO
        (void)add_to_showcmd(nchar);
-#endif
+
        if (vim_strchr((char_u *)"gGwW", nchar) == NULL)
        {
            clearopbeep(cap->oap);
index 3cd1d4019ff8568ff970407290bbd4943db0c37e..85a55f987c22cc18e7b2d1aab0f8af04b09f251a 100644 (file)
@@ -3931,7 +3931,7 @@ findoption(char_u *arg)
     return opt_idx;
 }
 
-#if defined(FEAT_EVAL) || defined(FEAT_TCL) || defined(FEAT_MZSCHEME)
+#if defined(FEAT_EVAL) || defined(FEAT_TCL) || defined(FEAT_MZSCHEME) || defined(FEAT_SPELL)
 /*
  * Get the value for an option.
  *
@@ -6851,9 +6851,7 @@ paste_option_changed(void)
     static int old_p_paste = FALSE;
     static int save_sm = 0;
     static int save_sta = 0;
-#ifdef FEAT_CMDL_INFO
     static int save_ru = 0;
-#endif
 #ifdef FEAT_RIGHTLEFT
     static int save_ri = 0;
     static int save_hkmap = 0;
@@ -6887,9 +6885,7 @@ paste_option_changed(void)
            // save global options
            save_sm = p_sm;
            save_sta = p_sta;
-#ifdef FEAT_CMDL_INFO
            save_ru = p_ru;
-#endif
 #ifdef FEAT_RIGHTLEFT
            save_ri = p_ri;
            save_hkmap = p_hkmap;
@@ -6930,11 +6926,9 @@ paste_option_changed(void)
        // set global options
        p_sm = 0;                   // no showmatch
        p_sta = 0;                  // no smarttab
-#ifdef FEAT_CMDL_INFO
        if (p_ru)
            status_redraw_all();    // redraw to remove the ruler
        p_ru = 0;                   // no ruler
-#endif
 #ifdef FEAT_RIGHTLEFT
        p_ri = 0;                   // no reverse insert
        p_hkmap = 0;                // no Hebrew keyboard
@@ -6980,11 +6974,9 @@ paste_option_changed(void)
        // restore global options
        p_sm = save_sm;
        p_sta = save_sta;
-#ifdef FEAT_CMDL_INFO
        if (p_ru != save_ru)
            status_redraw_all();    // redraw to draw the ruler
        p_ru = save_ru;
-#endif
 #ifdef FEAT_RIGHTLEFT
        p_ri = save_ri;
        p_hkmap = save_hkmap;
index 19e2a781a5fa32950fbf786d7bf1eb7e9cdd3e79..6d05f0e29914b3d9ebb6b542c7e42c9c455d0c09 100644 (file)
@@ -821,9 +821,7 @@ EXTERN int  p_ri;           // 'revins'
 #if defined(DYNAMIC_RUBY)
 EXTERN char_u  *p_rubydll;     // 'rubydll'
 #endif
-#ifdef FEAT_CMDL_INFO
 EXTERN int     p_ru;           // 'ruler'
-#endif
 #ifdef FEAT_STL_OPT
 EXTERN char_u  *p_ruf;         // 'rulerformat'
 #endif
@@ -890,9 +888,7 @@ EXTERN int  p_sn;           // 'shortname'
 #ifdef FEAT_LINEBREAK
 EXTERN char_u  *p_sbr;         // 'showbreak'
 #endif
-#ifdef FEAT_CMDL_INFO
 EXTERN int     p_sc;           // 'showcmd'
-#endif
 EXTERN int     p_sft;          // 'showfulltag'
 EXTERN int     p_sm;           // 'showmatch'
 EXTERN int     p_smd;          // 'showmode'
index f9e10ae402520fa12b8baa795aab25e3a6a40a1b..db85a39891ec1587e9cad1031c75204d1eda72b3 100644 (file)
@@ -2060,11 +2060,7 @@ static struct vimoption options[] =
 #endif
                            SCTX_INIT},
     {"ruler",      "ru",   P_BOOL|P_VI_DEF|P_VIM|P_RSTAT,
-#ifdef FEAT_CMDL_INFO
                            (char_u *)&p_ru, PV_NONE,
-#else
-                           (char_u *)NULL, PV_NONE,
-#endif
                            {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
     {"rulerformat", "ruf",  P_STRING|P_VI_DEF|P_ALLOCED|P_RSTAT|P_MLE,
 #ifdef FEAT_STL_OPT
@@ -2224,11 +2220,7 @@ static struct vimoption options[] =
 #endif
                            {(char_u *)"", (char_u *)0L} SCTX_INIT},
     {"showcmd",            "sc",   P_BOOL|P_VIM,
-#ifdef FEAT_CMDL_INFO
                            (char_u *)&p_sc, PV_NONE,
-#else
-                           (char_u *)NULL, PV_NONE,
-#endif
                            {(char_u *)FALSE,
 #ifdef UNIX
                                (char_u *)FALSE
index d1dd5a40177ad2dde2b4be4874ec49e1c667230a..f8fca8a2823b3c5437de27dbea940dfd22cc256c 100644 (file)
@@ -4420,7 +4420,6 @@ showmode(void)
        msg_clr_eos();
     }
 
-#ifdef FEAT_CMDL_INFO
     // In Visual mode the size of the selected area must be redrawn.
     if (VIsual_active)
        clear_showcmd();
@@ -4429,7 +4428,7 @@ showmode(void)
     // message and must be redrawn
     if (redrawing() && lastwin->w_status_height == 0)
        win_redr_ruler(lastwin, TRUE, FALSE);
-#endif
+
     redraw_cmdline = FALSE;
     redraw_mode = FALSE;
     clear_cmdline = FALSE;
@@ -4790,18 +4789,17 @@ messaging(void)
     void
 comp_col(void)
 {
-#if defined(FEAT_CMDL_INFO)
     int last_has_status = (p_ls == 2 || (p_ls == 1 && !ONE_WINDOW));
 
     sc_col = 0;
     ru_col = 0;
     if (p_ru)
     {
-# ifdef FEAT_STL_OPT
+#ifdef FEAT_STL_OPT
        ru_col = (ru_wid ? ru_wid : COL_RULER) + 1;
-# else
+#else
        ru_col = COL_RULER + 1;
-# endif
+#endif
        // no last status line, adjust sc_col
        if (!last_has_status)
            sc_col = ru_col;
@@ -4818,10 +4816,6 @@ comp_col(void)
        sc_col = 1;
     if (ru_col <= 0)
        ru_col = 1;
-#else
-    sc_col = Columns;
-    ru_col = Columns;
-#endif
 #ifdef FEAT_EVAL
     set_vim_var_nr(VV_ECHOSPACE, sc_col - 1);
 #endif
index 975b5a6789a9719c9229182e4eb13bdc84e116b2..3196ae78f400c3f494ba0c7c333cd6b1b38c7f0f 100644 (file)
@@ -2932,9 +2932,11 @@ ex_spellrepall(exarg_T *eap UNUSED)
            STRCAT(p, line + curwin->w_cursor.col + STRLEN(repl_from));
            ml_replace(curwin->w_cursor.lnum, p, FALSE);
            changed_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col);
+#if defined(FEAT_PROP_POPUP)
            if (curbuf->b_has_textprop && addlen != 0)
                adjust_prop_columns(curwin->w_cursor.lnum,
                                 curwin->w_cursor.col, addlen, APC_SUBSTITUTE);
+#endif
 
            if (curwin->w_cursor.lnum != prev_lnum)
            {
index cc70ca7361998f23da25b6e0fc199e02ebf534e6..97e89985b3940a494acf4b18386c844356750694 100644 (file)
@@ -702,9 +702,11 @@ spell_suggest(int count)
            curwin->w_cursor.col = c;
 
            changed_bytes(curwin->w_cursor.lnum, c);
+#if defined(FEAT_PROP_POPUP)
            if (curbuf->b_has_textprop && len_diff != 0)
                adjust_prop_columns(curwin->w_cursor.lnum, c, len_diff,
                                                               APC_SUBSTITUTE);
+#endif
        }
     }
     else
index dd2788baafc17d53e3bf0a55ccc1cbe637e5ebb6..bf65d52ed63d2fa836ee448a52f46393e625f694 100644 (file)
@@ -268,7 +268,7 @@ typedef struct
     int                wo_spell;
 # define w_p_spell w_onebuf_opt.wo_spell // 'spell'
 #endif
-#ifdef FEAT_SYN_HL
+#if defined(FEAT_SYN_HL) || defined(FEAT_FOLDING) || defined(FEAT_DIFF)
     int                wo_cuc;
 # define w_p_cuc w_onebuf_opt.wo_cuc   // 'cursorcolumn'
     int                wo_cul;
@@ -3785,17 +3785,15 @@ struct window_S
     linenr_T   w_redraw_bot;       // when != 0: last line needing redraw
     int                w_redr_status;      // if TRUE status line must be redrawn
 
-#ifdef FEAT_CMDL_INFO
     // remember what is shown in the ruler for this window (if 'ruler' set)
     pos_T      w_ru_cursor;        // cursor position shown in ruler
     colnr_T    w_ru_virtcol;       // virtcol shown in ruler
     linenr_T   w_ru_topline;       // topline shown in ruler
     linenr_T   w_ru_line_count;    // line count used for ruler
-# ifdef FEAT_DIFF
+#ifdef FEAT_DIFF
     int                w_ru_topfill;       // topfill shown in ruler
-# endif
-    char       w_ru_empty;         // TRUE if ruler shows 0-1 (empty line)
 #endif
+    char       w_ru_empty;         // TRUE if ruler shows 0-1 (empty line)
 
     int                w_alt_fnum;         // alternate file (for # and CTRL-^)
 
@@ -3833,7 +3831,7 @@ struct window_S
     long_u     w_p_fde_flags;      // flags for 'foldexpr'
     long_u     w_p_fdt_flags;      // flags for 'foldtext'
 #endif
-#ifdef FEAT_SYN_HL
+#if defined(FEAT_SIGNS) || defined(FEAT_FOLDING) || defined(FEAT_DIFF)
     int                *w_p_cc_cols;       // array of columns to highlight or NULL
     char_u     w_p_culopt_flags;   // flags for cursorline highlighting
 #endif
index 46ed325a52feff58a4588ed3586f400e88bca52c..ae532dc7219f9c3436c3b8a59d065a789bceefb9 100644 (file)
@@ -2315,15 +2315,13 @@ term_paste_register(int prev_c UNUSED)
     long       reglen = 0;
     int                type;
 
-#ifdef FEAT_CMDL_INFO
     if (add_to_showcmd(prev_c))
     if (add_to_showcmd('"'))
        out_flush();
-#endif
+
     c = term_vgetc();
-#ifdef FEAT_CMDL_INFO
     clear_showcmd();
-#endif
+
     if (!term_use_loop())
        // job finished while waiting for a character
        return;
@@ -2702,16 +2700,14 @@ terminal_loop(int blocking)
            int     prev_raw_c = raw_c;
            int     prev_mod_mask = mod_mask;
 
-#ifdef FEAT_CMDL_INFO
            if (add_to_showcmd(c))
                out_flush();
-#endif
+
            raw_c = term_vgetc();
            c = raw_c_to_ctrl(raw_c);
 
-#ifdef FEAT_CMDL_INFO
            clear_showcmd();
-#endif
+
            if (!term_use_loop_check(TRUE)
                                         || in_terminal_loop != curbuf->b_term)
                // job finished while waiting for a character
index 33ae7a66be1033dcd0f91300eeeec5b60eb1dae4..a6e3a5fd61e0758f7464c73b9114a4996b5d3393 100644 (file)
@@ -158,11 +158,7 @@ static char *(features[]) =
 #endif
        "+cmdline_compl",
        "+cmdline_hist",
-#ifdef FEAT_CMDL_INFO
        "+cmdline_info",
-#else
-       "-cmdline_info",
-#endif
        "+comments",
 #ifdef FEAT_CONCEAL
        "+conceal",
@@ -699,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    747,
 /**/
     746,
 /**/
index 8486f1a5e91d2ca7815fec3de56c7e20c735100c..51416af53f27ef4f7710dabcfdd234df18a7277e 100644 (file)
@@ -604,9 +604,8 @@ wingotofile:
                LANGMAP_ADJUST(xchar, TRUE);
                --no_mapping;
                --allow_keys;
-#ifdef FEAT_CMDL_INFO
                (void)add_to_showcmd(xchar);
-#endif
+
                switch (xchar)
                {
 #if defined(FEAT_QUICKFIX)
@@ -6285,7 +6284,7 @@ win_drag_vsep_line(win_T *dragwin, int offset)
     if (fr == NULL)
        // This can happen when calling win_move_separator() on the rightmost
        // window.  Just don't do anything.
-       return;                 
+       return;
 
     // grow frame fr by offset lines
     frame_new_width(fr, fr->fr_width + offset, left, FALSE);