Patch 9.0.0747

6 views
Skip to first unread message

Bram Moolenaar

unread,
Oct 13, 2022, 5:13:40 PM10/13/22
to vim...@googlegroups.com

Patch 9.0.0747
Problem: Too many #ifdefs.
Solution: Gradudate the +cmdline_info feature. (Martin Tournoij,
closes #11330)
Files: 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


*** ../vim-9.0.0746/runtime/doc/options.txt 2022-10-13 12:51:09.544145472 +0100
--- runtime/doc/options.txt 2022-10-13 22:00:28.062187264 +0100
***************
*** 6447,6454 ****
*'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:
--- 6476,6481 ----
***************
*** 7108,7115 ****
'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:
--- 7135,7140 ----
*** ../vim-9.0.0746/runtime/doc/various.txt 2022-10-08 19:26:35.694195418 +0100
--- runtime/doc/various.txt 2022-10-13 22:03:11.574132481 +0100
***************
*** 353,359 ****
*+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 *+cmdwin* |cmdline-window| support; Always enabled since 9.0.0657
T *+comments* |'comments'| support
N *+conceal* "conceal" support, see |conceal| |:syn-conceal| etc.
--- 355,362 ----
*+clipboard_working* |clipboard| support compiled-in and working
T *+cmdline_compl* command line completion |cmdline-completion|
T *+cmdline_hist* command line history |cmdline-history|
! 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.
*** ../vim-9.0.0746/src/arglist.c 2022-10-04 16:23:39.010042185 +0100
--- src/arglist.c 2022-10-13 22:00:28.062187264 +0100
***************
*** 295,301 ****
return OK;
}

! #if defined(FEAT_QUICKFIX) || defined(FEAT_SYN_HL) || defined(PROTO)
/*
* Parse a list of arguments (file names), expand them and return in
* "fnames[fcountp]". When "wig" is TRUE, removes files matching 'wildignore'.
--- 295,301 ----
return OK;
}

! #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'.
*** ../vim-9.0.0746/src/buffer.c 2022-10-10 11:46:12.206333720 +0100
--- src/buffer.c 2022-10-13 22:00:28.066187262 +0100
***************
*** 2543,2549 ****
}
}

! #if defined(FEAT_QUICKFIX) || defined(FEAT_EVAL) || defined(PROTO)
/*
* Find file in buffer list by name (it has to be for the current window).
* Returns NULL if not found.
--- 2543,2549 ----
}
}

! #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,3859 ****
(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,
--- 3846,3857 ----
***************
*** 5177,5184 ****
}
#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.
--- 5175,5180 ----
***************
*** 5213,5219 ****
? (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.
--- 5209,5214 ----
*** ../vim-9.0.0746/src/charset.c 2022-10-09 21:53:35.319363028 +0100
--- src/charset.c 2022-10-13 22:00:28.066187262 +0100
***************
*** 1085,1091 ****
int *headp UNUSED)
{
win_T *wp = cts->cts_win;
! #ifdef FEAT_PROP_POPUP
char_u *line = cts->cts_line; // start of the line
#endif
char_u *s = cts->cts_ptr;
--- 1085,1091 ----
int *headp UNUSED)
{
win_T *wp = cts->cts_win;
! #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;
*** ../vim-9.0.0746/src/digraph.c 2022-09-24 15:55:22.385626232 +0100
--- src/digraph.c 2022-10-13 22:00:28.066187262 +0100
***************
*** 1546,1555 ****
)
putcmdline(c, TRUE);
}
- #ifdef FEAT_CMDL_INFO
else
add_to_showcmd(c);
- #endif
++no_mapping;
++allow_keys;
cc = plain_vgetc();
--- 1546,1553 ----
*** ../vim-9.0.0746/src/drawline.c 2022-10-11 21:01:44.382815392 +0100
--- src/drawline.c 2022-10-13 22:00:28.066187262 +0100
***************
*** 1075,1081 ****
int get_term_attr = FALSE;
#endif

! #ifdef FEAT_SYN_HL
// margin columns for the screen line, needed for when 'cursorlineopt'
// contains "screenline"
int left_curline_col = 0;
--- 1075,1081 ----
int get_term_attr = FALSE;
#endif

! #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,1094 ****
--- 1089,1096 ----

#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
*** ../vim-9.0.0746/src/drawscreen.c 2022-10-04 20:35:14.511103246 +0100
--- src/drawscreen.c 2022-10-13 22:00:28.066187262 +0100
***************
*** 547,555 ****
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
}

/*
--- 547,553 ----
***************
*** 619,627 ****
redraw_custom_statusline(curwin);
else
#endif
- #ifdef FEAT_CMDL_INFO
win_redr_ruler(curwin, always, FALSE);
- #endif

if (need_maketitle
#ifdef FEAT_STL_OPT
--- 617,623 ----
***************
*** 636,642 ****
draw_tabline();
}

- #if defined(FEAT_CMDL_INFO) || defined(PROTO)
void
win_redr_ruler(win_T *wp, int always, int ignore_pum)
{
--- 632,637 ----
***************
*** 816,822 ****
#endif
}
}
- #endif

/*
* To be called when "updating_screen" was set before and now the postponed
--- 811,816 ----
***************
*** 2924,2933 ****
if (redraw_tabline)
draw_tabline();

! if (wp->w_redr_status
! # ifdef FEAT_CMDL_INFO
! || p_ru
! # endif
# ifdef FEAT_STL_OPT
|| *p_stl != NUL || *wp->w_p_stl != NUL
# endif
--- 2918,2924 ----
if (redraw_tabline)
draw_tabline();

! if (wp->w_redr_status || p_ru
# ifdef FEAT_STL_OPT
|| *p_stl != NUL || *wp->w_p_stl != NUL
# endif
*** ../vim-9.0.0746/src/edit.c 2022-10-12 19:53:10.617726846 +0100
--- src/edit.c 2022-10-13 22:00:28.066187262 +0100
***************
*** 310,318 ****
#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);
--- 310,316 ----
***************
*** 1561,1569 ****
}
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.
--- 1559,1565 ----
***************
*** 1572,1580 ****
// 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
--- 1568,1574 ----
***************
*** 1907,1916 ****
// 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')
--- 1901,1908 ----
***************
*** 3372,3380 ****
ins_redraw(FALSE);

edit_putchar('"', TRUE);
- #ifdef FEAT_CMDL_INFO
add_to_showcmd_c(Ctrl_R);
- #endif
}

#ifdef USE_ON_FLY_SCROLL
--- 3364,3370 ----
***************
*** 3393,3401 ****
{
// 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);
}
--- 3383,3389 ----
***************
*** 3463,3471 ****
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())
--- 3451,3457 ----
***************
*** 5176,5184 ****

edit_putchar('?', TRUE);
did_putchar = TRUE;
- #ifdef FEAT_CMDL_INFO
add_to_showcmd_c(Ctrl_K);
- #endif
}

#ifdef USE_ON_FLY_SCROLL
--- 5162,5168 ----
***************
*** 5199,5207 ****

if (IS_SPECIAL(c) || mod_mask) // special key
{
- #ifdef FEAT_CMDL_INFO
clear_showcmd();
- #endif
insert_special(c, TRUE, FALSE);
return NUL;
}
--- 5183,5189 ----
***************
*** 5219,5227 ****
edit_putchar(c, TRUE);
did_putchar = TRUE;
}
- #ifdef FEAT_CMDL_INFO
add_to_showcmd_c(c);
- #endif
}
++no_mapping;
++allow_keys;
--- 5201,5207 ----
***************
*** 5236,5250 ****
{
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
--- 5216,5226 ----
*** ../vim-9.0.0746/src/errors.h 2022-10-04 16:23:39.010042185 +0100
--- src/errors.h 2022-10-13 22:00:28.066187262 +0100
***************
*** 1907,1913 ****
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)
EXTERN char e_option_str_is_not_set[]
INIT(= N_("E764: Option '%s' is not set"));
#endif
--- 1907,1913 ----
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) || defined(FEAT_SPELL)
EXTERN char e_option_str_is_not_set[]
INIT(= N_("E764: Option '%s' is not set"));
#endif
***************
*** 3082,3088 ****
EXTERN char e_redefining_imported_item_str[]
INIT(= N_("E1213: Redefining imported item \"%s\""));
#endif
! #if defined(FEAT_DIGRAPHS) && defined(FEAT_EVAL)
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[]
--- 3082,3088 ----
EXTERN char e_redefining_imported_item_str[]
INIT(= N_("E1213: Redefining imported item \"%s\""));
#endif
! #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[]
*** ../vim-9.0.0746/src/evalfunc.c 2022-10-10 12:42:52.472239813 +0100
--- src/evalfunc.c 2022-10-13 22:00:28.066187262 +0100
***************
*** 6091,6110 ****
#endif
},
{"scrollbind", 1},
! {"showcmd",
! #ifdef FEAT_CMDL_INFO
! 1
! #else
! 0
! #endif
! },
! {"cmdline_info",
! #ifdef FEAT_CMDL_INFO
! 1
! #else
! 0
! #endif
! },
{"signs",
#ifdef FEAT_SIGNS
1
--- 6091,6098 ----
#endif
},
{"scrollbind", 1},
! {"showcmd", 1},
! {"cmdline_info", 1},
{"signs",
#ifdef FEAT_SIGNS
1
***************
*** 10276,10282 ****
p = highlight_has_attr(id, HL_ITALIC, modec);
break;

! case 'n':
if (TOLOWER_ASC(what[1]) == 'o') // nocombine
p = highlight_has_attr(id, HL_NOCOMBINE, modec);
else // name
--- 10264,10270 ----
p = highlight_has_attr(id, HL_ITALIC, modec);
break;

! case 'n':
if (TOLOWER_ASC(what[1]) == 'o') // nocombine
p = highlight_has_attr(id, HL_NOCOMBINE, modec);
else // name
*** ../vim-9.0.0746/src/feature.h 2022-10-12 11:12:42.657140252 +0100
--- src/feature.h 2022-10-13 22:07:02.498032008 +0100
***************
*** 126,131 ****
--- 126,132 ----
* +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 ..".
***************
*** 179,191 ****
#endif

/*
- * +cmdline_info 'showcmd' and 'ruler' options.
- */
- #ifdef FEAT_NORMAL
- # define FEAT_CMDL_INFO
- #endif
-
- /*
* +linebreak 'showbreak', 'breakat' and 'linebreak' options.
* Also 'numberwidth'.
*/
--- 180,185 ----
***************
*** 324,332 ****
*/
#ifdef FEAT_NORMAL
# define FEAT_STL_OPT
- # ifndef FEAT_CMDL_INFO
- # define FEAT_CMDL_INFO // 'ruler' is required for 'statusline'
- # endif
#endif

/*
--- 318,323 ----
*** ../vim-9.0.0746/src/getchar.c 2022-10-08 13:49:41.889378451 +0100
--- src/getchar.c 2022-10-13 22:00:28.070187262 +0100
***************
*** 3077,3085 ****
// '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
--- 3077,3083 ----
***************
*** 3149,3157 ****
{
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
--- 3147,3153 ----
***************
*** 3249,3258 ****
* 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
--- 3245,3252 ----
***************
*** 3351,3360 ****
}
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;
}
--- 3345,3352 ----
***************
*** 3442,3450 ****
* 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)
{
--- 3434,3440 ----
***************
*** 3462,3468 ****
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;
--- 3452,3457 ----
***************
*** 3476,3482 ****
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
--- 3465,3470 ----
***************
*** 3521,3530 ****
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)
--- 3509,3516 ----
*** ../vim-9.0.0746/src/message.c 2022-09-26 19:50:07.463112932 +0100
--- src/message.c 2022-10-13 22:00:28.070187262 +0100
***************
*** 1774,1780 ****
return retval;
}

! #if defined(FEAT_EVAL) || defined(PROTO)
/*
* Return the lhs or rhs of a mapping, with the key codes turned into printable
* strings, in an allocated string.
--- 1774,1780 ----
return retval;
}

! #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.
*** ../vim-9.0.0746/src/normal.c 2022-10-12 19:53:10.621726849 +0100
--- src/normal.c 2022-10-13 22:00:28.070187262 +0100
***************
*** 20,28 ****
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.
--- 20,26 ----
***************
*** 222,230 ****
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)
{
--- 220,226 ----
***************
*** 255,263 ****
--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
--- 251,257 ----
***************
*** 272,280 ****
LANGMAP_ADJUST(c, TRUE);
--no_mapping;
--allow_keys;
- #ifdef FEAT_CMDL_INFO
*need_flushbuf |= add_to_showcmd(c);
- #endif
goto getcount; // jump back
}
}
--- 266,272 ----
***************
*** 375,383 ****
*/
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)
{
--- 367,373 ----
***************
*** 465,473 ****
p_smd = save_smd;
#endif
State = MODE_NORMAL_BUSY;
- #ifdef FEAT_CMDL_INFO
*need_flushbuf |= add_to_showcmd(*cp);
- #endif

if (!lit)
{
--- 455,461 ----
***************
*** 482,492 ****
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
--- 470,478 ----
***************
*** 789,797 ****
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,
--- 775,781 ----
***************
*** 879,892 ****
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)
--- 863,875 ----
if (normal_cmd_needs_more_chars(&ca, nv_cmds[idx].cmd_flags))
idx = normal_cmd_get_more_chars(idx, &ca, &need_flushbuf);

// 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();
!
if (ca.cmdchar != K_IGNORE)
{
if (ex_normal_busy)
***************
*** 991,1001 ****
}
#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);
--- 974,982 ----
***************
*** 1566,1578 ****
{
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
*/
--- 1547,1556 ----
***************
*** 1820,1826 ****

setcursor(); // put cursor back where it belongs
}
- #endif

/*
* When "check" is FALSE, prepare for commands that scroll the window.
--- 1798,1803 ----
***************
*** 2550,2558 ****
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))
--- 2527,2534 ----
LANGMAP_ADJUST(nchar, TRUE);
--no_mapping;
--allow_keys;
(void)add_to_showcmd(nchar);
!
if (nchar == K_DEL || nchar == K_KDEL)
n /= 10;
else if (VIM_ISDIGIT(nchar))
***************
*** 2607,2615 ****
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);
--- 2583,2590 ----
LANGMAP_ADJUST(nchar, TRUE);
--no_mapping;
--allow_keys;
(void)add_to_showcmd(nchar);
!
if (vim_strchr((char_u *)"gGwW", nchar) == NULL)
{
clearopbeep(cap->oap);
*** ../vim-9.0.0746/src/option.c 2022-10-06 11:38:48.154906022 +0100
--- src/option.c 2022-10-13 22:00:28.070187262 +0100
***************
*** 3931,3937 ****
return opt_idx;
}

! #if defined(FEAT_EVAL) || defined(FEAT_TCL) || defined(FEAT_MZSCHEME)
/*
* Get the value for an option.
*
--- 3931,3937 ----
return opt_idx;
}

! #if defined(FEAT_EVAL) || defined(FEAT_TCL) || defined(FEAT_MZSCHEME) || defined(FEAT_SPELL)
/*
* Get the value for an option.
*
***************
*** 6851,6859 ****
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;
--- 6851,6857 ----
***************
*** 6887,6895 ****
// 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;
--- 6885,6891 ----
***************
*** 6930,6940 ****
// 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
--- 6926,6934 ----
***************
*** 6980,6990 ****
// 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;
--- 6974,6982 ----
*** ../vim-9.0.0746/src/option.h 2022-10-13 12:51:09.544145472 +0100
--- src/option.h 2022-10-13 22:00:28.070187262 +0100
***************
*** 821,829 ****
#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
--- 821,827 ----
***************
*** 890,898 ****
#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'
--- 888,894 ----
*** ../vim-9.0.0746/src/optiondefs.h 2022-10-04 16:23:39.018042176 +0100
--- src/optiondefs.h 2022-10-13 22:00:28.070187262 +0100
***************
*** 2060,2070 ****
#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
--- 2060,2066 ----
***************
*** 2224,2234 ****
#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
--- 2220,2226 ----
*** ../vim-9.0.0746/src/screen.c 2022-10-11 12:48:40.311207487 +0100
--- src/screen.c 2022-10-13 22:00:28.070187262 +0100
***************
*** 4420,4426 ****
msg_clr_eos();
}

- #ifdef FEAT_CMDL_INFO
// In Visual mode the size of the selected area must be redrawn.
if (VIsual_active)
clear_showcmd();
--- 4420,4425 ----
***************
*** 4429,4435 ****
// 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;
--- 4428,4434 ----
// message and must be redrawn
if (redrawing() && lastwin->w_status_height == 0)
win_redr_ruler(lastwin, TRUE, FALSE);
!
redraw_cmdline = FALSE;
redraw_mode = FALSE;
clear_cmdline = FALSE;
***************
*** 4790,4807 ****
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
ru_col = (ru_wid ? ru_wid : COL_RULER) + 1;
! # else
ru_col = COL_RULER + 1;
! # endif
// no last status line, adjust sc_col
if (!last_has_status)
sc_col = ru_col;
--- 4789,4805 ----
void
comp_col(void)
{
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
ru_col = (ru_wid ? ru_wid : COL_RULER) + 1;
! #else
ru_col = COL_RULER + 1;
! #endif
// no last status line, adjust sc_col
if (!last_has_status)
sc_col = ru_col;
***************
*** 4818,4827 ****
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
--- 4816,4821 ----
*** ../vim-9.0.0746/src/spell.c 2022-09-28 11:48:26.673156959 +0100
--- src/spell.c 2022-10-13 22:00:28.070187262 +0100
***************
*** 2932,2940 ****
--- 2932,2942 ----
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)
{
*** ../vim-9.0.0746/src/spellsuggest.c 2022-07-30 11:39:52.398622432 +0100
--- src/spellsuggest.c 2022-10-13 22:00:28.074187261 +0100
***************
*** 702,710 ****
--- 702,712 ----
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
*** ../vim-9.0.0746/src/structs.h 2022-10-13 21:54:23.962227932 +0100
--- src/structs.h 2022-10-13 22:00:28.074187261 +0100
***************
*** 268,274 ****
int wo_spell;
# define w_p_spell w_onebuf_opt.wo_spell // 'spell'
#endif
! #ifdef FEAT_SYN_HL
int wo_cuc;
# define w_p_cuc w_onebuf_opt.wo_cuc // 'cursorcolumn'
int wo_cul;
--- 268,274 ----
int wo_spell;
# define w_p_spell w_onebuf_opt.wo_spell // 'spell'
#endif
! #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,3801 ****
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
int w_ru_topfill; // topfill shown in ruler
- # endif
- char w_ru_empty; // TRUE if ruler shows 0-1 (empty line)
#endif

int w_alt_fnum; // alternate file (for # and CTRL-^)

--- 3785,3799 ----
linenr_T w_redraw_bot; // when != 0: last line needing redraw
int w_redr_status; // if TRUE status line must be redrawn

// 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
int w_ru_topfill; // topfill shown in ruler
#endif
+ char w_ru_empty; // TRUE if ruler shows 0-1 (empty line)

int w_alt_fnum; // alternate file (for # and CTRL-^)

***************
*** 3833,3839 ****
long_u w_p_fde_flags; // flags for 'foldexpr'
long_u w_p_fdt_flags; // flags for 'foldtext'
#endif
! #ifdef FEAT_SYN_HL
int *w_p_cc_cols; // array of columns to highlight or NULL
char_u w_p_culopt_flags; // flags for cursorline highlighting
#endif
--- 3831,3837 ----
long_u w_p_fde_flags; // flags for 'foldexpr'
long_u w_p_fdt_flags; // flags for 'foldtext'
#endif
! #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
*** ../vim-9.0.0746/src/terminal.c 2022-10-09 18:53:29.024591198 +0100
--- src/terminal.c 2022-10-13 22:00:28.074187261 +0100
***************
*** 2315,2329 ****
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;
--- 2315,2327 ----
long reglen = 0;
int type;

if (add_to_showcmd(prev_c))
if (add_to_showcmd('"'))
out_flush();
!
c = term_vgetc();
clear_showcmd();
!
if (!term_use_loop())
// job finished while waiting for a character
return;
***************
*** 2702,2717 ****
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
--- 2700,2713 ----
int prev_raw_c = raw_c;
int prev_mod_mask = mod_mask;

if (add_to_showcmd(c))
out_flush();
!
raw_c = term_vgetc();
c = raw_c_to_ctrl(raw_c);

clear_showcmd();
!
if (!term_use_loop_check(TRUE)
|| in_terminal_loop != curbuf->b_term)
// job finished while waiting for a character
*** ../vim-9.0.0746/src/version.c 2022-10-13 21:54:23.962227932 +0100
--- src/version.c 2022-10-13 22:02:22.878150506 +0100
***************
*** 158,168 ****
#endif
"+cmdline_compl",
"+cmdline_hist",
- #ifdef FEAT_CMDL_INFO
"+cmdline_info",
- #else
- "-cmdline_info",
- #endif
"+comments",
#ifdef FEAT_CONCEAL
"+conceal",
--- 158,164 ----
*** ../vim-9.0.0746/src/window.c 2022-10-07 11:20:24.034352636 +0100
--- src/window.c 2022-10-13 22:00:28.074187261 +0100
***************
*** 604,612 ****
LANGMAP_ADJUST(xchar, TRUE);
--no_mapping;
--allow_keys;
- #ifdef FEAT_CMDL_INFO
(void)add_to_showcmd(xchar);
! #endif
switch (xchar)
{
#if defined(FEAT_QUICKFIX)
--- 604,611 ----
LANGMAP_ADJUST(xchar, TRUE);
--no_mapping;
--allow_keys;
(void)add_to_showcmd(xchar);
!
switch (xchar)
{
#if defined(FEAT_QUICKFIX)
***************
*** 6285,6291 ****
if (fr == NULL)
// This can happen when calling win_move_separator() on the rightmost
// window. Just don't do anything.
! return;

// grow frame fr by offset lines
frame_new_width(fr, fr->fr_width + offset, left, FALSE);
--- 6284,6290 ----
if (fr == NULL)
// This can happen when calling win_move_separator() on the rightmost
// window. Just don't do anything.
! return;

// grow frame fr by offset lines
frame_new_width(fr, fr->fr_width + offset, left, FALSE);
*** ../vim-9.0.0746/src/version.c 2022-10-13 21:54:23.962227932 +0100
--- src/version.c 2022-10-13 22:02:22.878150506 +0100
***************
*** 701,702 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 747,
/**/

--
Michael: There is no such thing as a dump question.
Bernard: Sure there is. For example "what is a core dump?"

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages