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