mirror of
https://github.com/zoriya/vim.git
synced 2025-12-19 13:45:18 +00:00
patch 7.4.793
Problem: Can't specify when not to ring the bell. Solution: Add the 'belloff' option. (Christian Brabandt)
This commit is contained in:
@@ -1124,6 +1124,47 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
expression evaluates to a |List| this is equal to using each List item
|
expression evaluates to a |List| this is equal to using each List item
|
||||||
as a string and putting "\n" in between them.
|
as a string and putting "\n" in between them.
|
||||||
|
|
||||||
|
*'belloff'* *'bo'*
|
||||||
|
'belloff' 'bo' string (default "")
|
||||||
|
global
|
||||||
|
{not in Vi}
|
||||||
|
Specifies for which events the bell will not be rung. It is a comma
|
||||||
|
separated list of items. For each item that is present, the bell
|
||||||
|
will be silenced. This is most useful to specify specific events in
|
||||||
|
insert mode to be silenced.
|
||||||
|
|
||||||
|
item meaning when present ~
|
||||||
|
all All events.
|
||||||
|
backspace When hitting <BS> or <Del> and deleting results in an
|
||||||
|
error.
|
||||||
|
cursor Fail to move around using the cursor keys or
|
||||||
|
<PageUp>/<PageDown> in |Insert-mode|.
|
||||||
|
complete Error occurred when using |i_CTRL-X_CTRL-K| or
|
||||||
|
|i_CTRL-X_CTRL-T|.
|
||||||
|
copy Cannot copy char from insert mode using |i_CTRL-Y| or
|
||||||
|
|i_CTRL-E|.
|
||||||
|
ctrlg Unknown Char after <C-G> in Insert mode.
|
||||||
|
error Other Error occurred (e.g. try to join last line)
|
||||||
|
(mostly used in |Normal-mode| or |Cmdline-mode|).
|
||||||
|
esc hitting <Esc> in |Normal-mode|.
|
||||||
|
ex In |Visual-mode|, hitting |Q| results in an error.
|
||||||
|
hangul Error occurred when using hangul input.
|
||||||
|
insertmode Pressing <Esc> in 'insertmode'.
|
||||||
|
lang Calling the beep module for Lua/Mzscheme/TCL.
|
||||||
|
mess No output available for |g<|.
|
||||||
|
showmatch Error occurred for 'showmatch' function.
|
||||||
|
operator Empty region error |cpo-E|.
|
||||||
|
register Unknown register after <C-R> in |Insert-mode|.
|
||||||
|
shell Bell from shell output |:!|.
|
||||||
|
spell Error happened on spell suggest.
|
||||||
|
wildmode More matches in |cmdline-completion| available
|
||||||
|
(depends on the 'wildmode' setting).
|
||||||
|
|
||||||
|
This is most useful, to fine tune when in insert mode the bell should
|
||||||
|
be rung. For normal mode and ex commands, the bell is often rung to
|
||||||
|
indicate that an error occurred. It can be silenced by adding the
|
||||||
|
"error" keyword.
|
||||||
|
|
||||||
*'binary'* *'bin'* *'nobinary'* *'nobin'*
|
*'binary'* *'bin'* *'nobinary'* *'nobin'*
|
||||||
'binary' 'bin' boolean (default off)
|
'binary' 'bin' boolean (default off)
|
||||||
local to buffer
|
local to buffer
|
||||||
@@ -2721,7 +2762,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
makes a difference for error messages, the bell will be used always
|
makes a difference for error messages, the bell will be used always
|
||||||
for a lot of errors without a message (e.g., hitting <Esc> in Normal
|
for a lot of errors without a message (e.g., hitting <Esc> in Normal
|
||||||
mode). See 'visualbell' on how to make the bell behave like a beep,
|
mode). See 'visualbell' on how to make the bell behave like a beep,
|
||||||
screen flash or do nothing.
|
screen flash or do nothing. See 'belloff' to finetune when to ring the
|
||||||
|
bell.
|
||||||
|
|
||||||
*'errorfile'* *'ef'*
|
*'errorfile'* *'ef'*
|
||||||
'errorfile' 'ef' string (Amiga default: "AztecC.Err",
|
'errorfile' 'ef' string (Amiga default: "AztecC.Err",
|
||||||
|
|||||||
36
src/edit.c
36
src/edit.c
@@ -982,7 +982,7 @@ do_intr:
|
|||||||
got_int = FALSE;
|
got_int = FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
vim_beep();
|
vim_beep(BO_IM);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
doESCkey:
|
doESCkey:
|
||||||
@@ -2210,7 +2210,7 @@ has_compl_option(dict_opt)
|
|||||||
hl_attr(HLF_E));
|
hl_attr(HLF_E));
|
||||||
if (emsg_silent == 0)
|
if (emsg_silent == 0)
|
||||||
{
|
{
|
||||||
vim_beep();
|
vim_beep(BO_COMPL);
|
||||||
setcursor();
|
setcursor();
|
||||||
out_flush();
|
out_flush();
|
||||||
ui_delay(2000L, FALSE);
|
ui_delay(2000L, FALSE);
|
||||||
@@ -8263,7 +8263,7 @@ ins_reg()
|
|||||||
}
|
}
|
||||||
if (regname == NUL || !valid_yank_reg(regname, FALSE))
|
if (regname == NUL || !valid_yank_reg(regname, FALSE))
|
||||||
{
|
{
|
||||||
vim_beep();
|
vim_beep(BO_REG);
|
||||||
need_redraw = TRUE; /* remove the '"' */
|
need_redraw = TRUE; /* remove the '"' */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -8281,7 +8281,7 @@ ins_reg()
|
|||||||
}
|
}
|
||||||
else if (insert_reg(regname, literally) == FAIL)
|
else if (insert_reg(regname, literally) == FAIL)
|
||||||
{
|
{
|
||||||
vim_beep();
|
vim_beep(BO_REG);
|
||||||
need_redraw = TRUE; /* remove the '"' */
|
need_redraw = TRUE; /* remove the '"' */
|
||||||
}
|
}
|
||||||
else if (stop_insert_mode)
|
else if (stop_insert_mode)
|
||||||
@@ -8355,7 +8355,7 @@ ins_ctrl_g()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
/* Unknown CTRL-G command, reserved for future expansion. */
|
/* Unknown CTRL-G command, reserved for future expansion. */
|
||||||
default: vim_beep();
|
default: vim_beep(BO_CTRLG);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8781,12 +8781,12 @@ ins_del()
|
|||||||
temp = curwin->w_cursor.col;
|
temp = curwin->w_cursor.col;
|
||||||
if (!can_bs(BS_EOL) /* only if "eol" included */
|
if (!can_bs(BS_EOL) /* only if "eol" included */
|
||||||
|| do_join(2, FALSE, TRUE, FALSE, FALSE) == FAIL)
|
|| do_join(2, FALSE, TRUE, FALSE, FALSE) == FAIL)
|
||||||
vim_beep();
|
vim_beep(BO_BS);
|
||||||
else
|
else
|
||||||
curwin->w_cursor.col = temp;
|
curwin->w_cursor.col = temp;
|
||||||
}
|
}
|
||||||
else if (del_char(FALSE) == FAIL) /* delete char under cursor */
|
else if (del_char(FALSE) == FAIL) /* delete char under cursor */
|
||||||
vim_beep();
|
vim_beep(BO_BS);
|
||||||
did_ai = FALSE;
|
did_ai = FALSE;
|
||||||
#ifdef FEAT_SMARTINDENT
|
#ifdef FEAT_SMARTINDENT
|
||||||
did_si = FALSE;
|
did_si = FALSE;
|
||||||
@@ -8861,7 +8861,7 @@ ins_bs(c, mode, inserted_space_p)
|
|||||||
&& curwin->w_cursor.col <= ai_col)
|
&& curwin->w_cursor.col <= ai_col)
|
||||||
|| (!can_bs(BS_EOL) && curwin->w_cursor.col == 0))))
|
|| (!can_bs(BS_EOL) && curwin->w_cursor.col == 0))))
|
||||||
{
|
{
|
||||||
vim_beep();
|
vim_beep(BO_BS);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9473,7 +9473,7 @@ ins_left()
|
|||||||
curwin->w_set_curswant = TRUE; /* so we stay at the end */
|
curwin->w_set_curswant = TRUE; /* so we stay at the end */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
vim_beep();
|
vim_beep(BO_CRSR);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -9533,7 +9533,7 @@ ins_s_left()
|
|||||||
curwin->w_set_curswant = TRUE;
|
curwin->w_set_curswant = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
vim_beep();
|
vim_beep(BO_CRSR);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -9583,7 +9583,7 @@ ins_right()
|
|||||||
curwin->w_cursor.col = 0;
|
curwin->w_cursor.col = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
vim_beep();
|
vim_beep(BO_CRSR);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -9602,7 +9602,7 @@ ins_s_right()
|
|||||||
curwin->w_set_curswant = TRUE;
|
curwin->w_set_curswant = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
vim_beep();
|
vim_beep(BO_CRSR);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -9633,7 +9633,7 @@ ins_up(startcol)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
vim_beep();
|
vim_beep(BO_CRSR);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -9665,7 +9665,7 @@ ins_pageup()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
vim_beep();
|
vim_beep(BO_CRSR);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -9696,7 +9696,7 @@ ins_down(startcol)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
vim_beep();
|
vim_beep(BO_CRSR);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -9728,7 +9728,7 @@ ins_pagedown()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
vim_beep();
|
vim_beep(BO_CRSR);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FEAT_DND
|
#ifdef FEAT_DND
|
||||||
@@ -10146,7 +10146,7 @@ ins_copychar(lnum)
|
|||||||
|
|
||||||
if (lnum < 1 || lnum > curbuf->b_ml.ml_line_count)
|
if (lnum < 1 || lnum > curbuf->b_ml.ml_line_count)
|
||||||
{
|
{
|
||||||
vim_beep();
|
vim_beep(BO_COPY);
|
||||||
return NUL;
|
return NUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10169,7 +10169,7 @@ ins_copychar(lnum)
|
|||||||
c = *ptr;
|
c = *ptr;
|
||||||
#endif
|
#endif
|
||||||
if (c == NUL)
|
if (c == NUL)
|
||||||
vim_beep();
|
vim_beep(BO_COPY);
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -900,7 +900,7 @@ getcmdline(firstc, count, indent)
|
|||||||
firstc != '@');
|
firstc != '@');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
vim_beep();
|
vim_beep(BO_WILD);
|
||||||
}
|
}
|
||||||
#ifdef FEAT_WILDMENU
|
#ifdef FEAT_WILDMENU
|
||||||
else if (xpc.xp_numfiles == -1)
|
else if (xpc.xp_numfiles == -1)
|
||||||
@@ -3710,7 +3710,7 @@ ExpandOne(xp, str, orig, options, mode)
|
|||||||
if (i < xp->xp_numfiles)
|
if (i < xp->xp_numfiles)
|
||||||
{
|
{
|
||||||
if (!(options & WILD_NO_BEEP))
|
if (!(options & WILD_NO_BEEP))
|
||||||
vim_beep();
|
vim_beep(BO_WILD);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -824,7 +824,7 @@ hangul_input_process(s, len)
|
|||||||
}
|
}
|
||||||
else if (n == AUTOMATA_ERROR)
|
else if (n == AUTOMATA_ERROR)
|
||||||
{
|
{
|
||||||
vim_beep();
|
vim_beep(BO_HANGUL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return len;
|
return len;
|
||||||
|
|||||||
@@ -1354,7 +1354,7 @@ luaV_eval(lua_State *L)
|
|||||||
static int
|
static int
|
||||||
luaV_beep(lua_State *L UNUSED)
|
luaV_beep(lua_State *L UNUSED)
|
||||||
{
|
{
|
||||||
vim_beep();
|
vim_beep(BO_LANG);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1569,7 +1569,7 @@ get_range_end(void *data UNUSED, int argc UNUSED, Scheme_Object **argv UNUSED)
|
|||||||
static Scheme_Object *
|
static Scheme_Object *
|
||||||
mzscheme_beep(void *data UNUSED, int argc UNUSED, Scheme_Object **argv UNUSED)
|
mzscheme_beep(void *data UNUSED, int argc UNUSED, Scheme_Object **argv UNUSED)
|
||||||
{
|
{
|
||||||
vim_beep();
|
vim_beep(BO_LANG);
|
||||||
return scheme_void;
|
return scheme_void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -337,7 +337,7 @@ beepcmd(dummy, interp, objc, objv)
|
|||||||
Tcl_WrongNumArgs(interp, 1, objv, NULL);
|
Tcl_WrongNumArgs(interp, 1, objv, NULL);
|
||||||
return TCL_ERROR;
|
return TCL_ERROR;
|
||||||
}
|
}
|
||||||
vim_beep();
|
vim_beep(BO_LANG);
|
||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2120,7 +2120,7 @@ msg_puts_display(str, maxlen, attr, recurse)
|
|||||||
while (msg_col & 7);
|
while (msg_col & 7);
|
||||||
}
|
}
|
||||||
else if (*s == BELL) /* beep (from ":sh") */
|
else if (*s == BELL) /* beep (from ":sh") */
|
||||||
vim_beep();
|
vim_beep(BO_SH);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
@@ -2363,7 +2363,7 @@ show_sb_text()
|
|||||||
* weird, typing a command without output results in one line. */
|
* weird, typing a command without output results in one line. */
|
||||||
mp = msg_sb_start(last_msgchunk);
|
mp = msg_sb_start(last_msgchunk);
|
||||||
if (mp == NULL || mp->sb_prev == NULL)
|
if (mp == NULL || mp->sb_prev == NULL)
|
||||||
vim_beep();
|
vim_beep(BO_MESS);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
do_more_prompt('G');
|
do_more_prompt('G');
|
||||||
|
|||||||
20
src/misc1.c
20
src/misc1.c
@@ -3699,22 +3699,25 @@ beep_flush()
|
|||||||
if (emsg_silent == 0)
|
if (emsg_silent == 0)
|
||||||
{
|
{
|
||||||
flush_buffers(FALSE);
|
flush_buffers(FALSE);
|
||||||
vim_beep();
|
vim_beep(BO_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* give a warning for an error
|
* Give a warning for an error.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
vim_beep()
|
vim_beep(val)
|
||||||
|
unsigned val; /* one of the BO_ values, e.g., BO_OPER */
|
||||||
{
|
{
|
||||||
if (emsg_silent == 0)
|
if (emsg_silent == 0)
|
||||||
|
{
|
||||||
|
if (!((bo_flags & val) || (bo_flags & BO_ALL)))
|
||||||
{
|
{
|
||||||
if (p_vb
|
if (p_vb
|
||||||
#ifdef FEAT_GUI
|
#ifdef FEAT_GUI
|
||||||
/* While the GUI is starting up the termcap is set for the GUI
|
/* While the GUI is starting up the termcap is set for the
|
||||||
* but the output still goes to a terminal. */
|
* GUI but the output still goes to a terminal. */
|
||||||
&& !(gui.in_use && gui.starting)
|
&& !(gui.in_use && gui.starting)
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
@@ -3725,9 +3728,9 @@ vim_beep()
|
|||||||
{
|
{
|
||||||
#ifdef MSDOS
|
#ifdef MSDOS
|
||||||
/*
|
/*
|
||||||
* The number of beeps outputted is reduced to avoid having to wait
|
* The number of beeps outputted is reduced to avoid having to
|
||||||
* for all the beeps to finish. This is only a problem on systems
|
* wait for all the beeps to finish. This is only a problem on
|
||||||
* where the beeps don't overlap.
|
* systems where the beeps don't overlap.
|
||||||
*/
|
*/
|
||||||
if (beep_count == 0 || beep_count == 10)
|
if (beep_count == 0 || beep_count == 10)
|
||||||
{
|
{
|
||||||
@@ -3740,6 +3743,7 @@ vim_beep()
|
|||||||
out_char(BELL);
|
out_char(BELL);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* When 'verbose' is set and we are sourcing a script or executing a
|
/* When 'verbose' is set and we are sourcing a script or executing a
|
||||||
* function give the user a hint where the beep comes from. */
|
* function give the user a hint where the beep comes from. */
|
||||||
|
|||||||
18
src/normal.c
18
src/normal.c
@@ -1880,7 +1880,7 @@ do_pending_operator(cap, old_col, gui_yank)
|
|||||||
VIsual_reselect = FALSE; /* don't reselect now */
|
VIsual_reselect = FALSE; /* don't reselect now */
|
||||||
if (empty_region_error)
|
if (empty_region_error)
|
||||||
{
|
{
|
||||||
vim_beep();
|
vim_beep(BO_OPER);
|
||||||
CancelRedo();
|
CancelRedo();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1897,7 +1897,7 @@ do_pending_operator(cap, old_col, gui_yank)
|
|||||||
{
|
{
|
||||||
if (!gui_yank)
|
if (!gui_yank)
|
||||||
{
|
{
|
||||||
vim_beep();
|
vim_beep(BO_OPER);
|
||||||
CancelRedo();
|
CancelRedo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1915,7 +1915,7 @@ do_pending_operator(cap, old_col, gui_yank)
|
|||||||
VIsual_reselect = FALSE; /* don't reselect now */
|
VIsual_reselect = FALSE; /* don't reselect now */
|
||||||
if (empty_region_error)
|
if (empty_region_error)
|
||||||
{
|
{
|
||||||
vim_beep();
|
vim_beep(BO_OPER);
|
||||||
CancelRedo();
|
CancelRedo();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1989,7 +1989,7 @@ do_pending_operator(cap, old_col, gui_yank)
|
|||||||
case OP_ROT13:
|
case OP_ROT13:
|
||||||
if (empty_region_error)
|
if (empty_region_error)
|
||||||
{
|
{
|
||||||
vim_beep();
|
vim_beep(BO_OPER);
|
||||||
CancelRedo();
|
CancelRedo();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2023,7 +2023,7 @@ do_pending_operator(cap, old_col, gui_yank)
|
|||||||
#ifdef FEAT_VISUALEXTRA
|
#ifdef FEAT_VISUALEXTRA
|
||||||
if (empty_region_error)
|
if (empty_region_error)
|
||||||
{
|
{
|
||||||
vim_beep();
|
vim_beep(BO_OPER);
|
||||||
CancelRedo();
|
CancelRedo();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2056,7 +2056,7 @@ do_pending_operator(cap, old_col, gui_yank)
|
|||||||
restart_edit = restart_edit_save;
|
restart_edit = restart_edit_save;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
vim_beep();
|
vim_beep(BO_OPER);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -2066,7 +2066,7 @@ do_pending_operator(cap, old_col, gui_yank)
|
|||||||
if (empty_region_error)
|
if (empty_region_error)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
vim_beep();
|
vim_beep(BO_OPER);
|
||||||
CancelRedo();
|
CancelRedo();
|
||||||
}
|
}
|
||||||
#ifdef FEAT_VISUALEXTRA
|
#ifdef FEAT_VISUALEXTRA
|
||||||
@@ -5359,7 +5359,7 @@ nv_exmode(cap)
|
|||||||
* Ignore 'Q' in Visual mode, just give a beep.
|
* Ignore 'Q' in Visual mode, just give a beep.
|
||||||
*/
|
*/
|
||||||
if (VIsual_active)
|
if (VIsual_active)
|
||||||
vim_beep();
|
vim_beep(BO_EX);
|
||||||
else if (!checkclearop(cap->oap))
|
else if (!checkclearop(cap->oap))
|
||||||
do_exmode(FALSE);
|
do_exmode(FALSE);
|
||||||
}
|
}
|
||||||
@@ -9055,7 +9055,7 @@ nv_esc(cap)
|
|||||||
redraw_curbuf_later(INVERTED);
|
redraw_curbuf_later(INVERTED);
|
||||||
}
|
}
|
||||||
else if (no_reason)
|
else if (no_reason)
|
||||||
vim_beep();
|
vim_beep(BO_ESC);
|
||||||
clearop(cap->oap);
|
clearop(cap->oap);
|
||||||
|
|
||||||
/* A CTRL-C is often used at the start of a menu. When 'insertmode' is
|
/* A CTRL-C is often used at the start of a menu. When 'insertmode' is
|
||||||
|
|||||||
@@ -632,6 +632,9 @@ static struct vimoption
|
|||||||
{"beautify", "bf", P_BOOL|P_VI_DEF,
|
{"beautify", "bf", P_BOOL|P_VI_DEF,
|
||||||
(char_u *)NULL, PV_NONE,
|
(char_u *)NULL, PV_NONE,
|
||||||
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
|
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
|
||||||
|
{"belloff", "bo", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
|
||||||
|
(char_u *)&p_bo, PV_NONE,
|
||||||
|
{(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
|
||||||
{"binary", "bin", P_BOOL|P_VI_DEF|P_RSTAT,
|
{"binary", "bin", P_BOOL|P_VI_DEF|P_RSTAT,
|
||||||
(char_u *)&p_bin, PV_BIN,
|
(char_u *)&p_bin, PV_BIN,
|
||||||
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
|
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
|
||||||
@@ -5323,6 +5326,7 @@ didset_options()
|
|||||||
(void)opt_strings_flags(p_cmp, p_cmp_values, &cmp_flags, TRUE);
|
(void)opt_strings_flags(p_cmp, p_cmp_values, &cmp_flags, TRUE);
|
||||||
#endif
|
#endif
|
||||||
(void)opt_strings_flags(p_bkc, p_bkc_values, &bkc_flags, TRUE);
|
(void)opt_strings_flags(p_bkc, p_bkc_values, &bkc_flags, TRUE);
|
||||||
|
(void)opt_strings_flags(p_bo, p_bo_values, &bo_flags, TRUE);
|
||||||
#ifdef FEAT_SESSION
|
#ifdef FEAT_SESSION
|
||||||
(void)opt_strings_flags(p_ssop, p_ssop_values, &ssop_flags, TRUE);
|
(void)opt_strings_flags(p_ssop, p_ssop_values, &ssop_flags, TRUE);
|
||||||
(void)opt_strings_flags(p_vop, p_ssop_values, &vop_flags, TRUE);
|
(void)opt_strings_flags(p_vop, p_ssop_values, &vop_flags, TRUE);
|
||||||
@@ -6997,6 +7001,11 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
|
|||||||
else if (check_opt_strings(p_bs, p_bs_values, TRUE) != OK)
|
else if (check_opt_strings(p_bs, p_bs_values, TRUE) != OK)
|
||||||
errmsg = e_invarg;
|
errmsg = e_invarg;
|
||||||
}
|
}
|
||||||
|
else if (varp == &p_bo)
|
||||||
|
{
|
||||||
|
if (opt_strings_flags(p_bo, p_bo_values, &bo_flags, TRUE) != OK)
|
||||||
|
errmsg = e_invarg;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
/* 'casemap' */
|
/* 'casemap' */
|
||||||
|
|||||||
31
src/option.h
31
src/option.h
@@ -338,6 +338,37 @@ static char *(p_bkc_values[]) = {"yes", "auto", "no", "breaksymlink", "breakhard
|
|||||||
# define BKC_BREAKHARDLINK 0x010
|
# define BKC_BREAKHARDLINK 0x010
|
||||||
EXTERN char_u *p_bdir; /* 'backupdir' */
|
EXTERN char_u *p_bdir; /* 'backupdir' */
|
||||||
EXTERN char_u *p_bex; /* 'backupext' */
|
EXTERN char_u *p_bex; /* 'backupext' */
|
||||||
|
EXTERN char_u *p_bo; /* 'belloff' */
|
||||||
|
EXTERN unsigned bo_flags;
|
||||||
|
# ifdef IN_OPTION_C
|
||||||
|
static char *(p_bo_values[]) = {"all", "backspace", "cursor", "complete",
|
||||||
|
"copy", "ctrlg", "error", "esc", "ex",
|
||||||
|
"hangul", "insertmode", "lang", "mess",
|
||||||
|
"showmatch", "operator", "register", "shell",
|
||||||
|
"spell", "wildmode", NULL};
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/* values for the 'beepon' option */
|
||||||
|
#define BO_ALL 0x0001
|
||||||
|
#define BO_BS 0x0002
|
||||||
|
#define BO_CRSR 0x0004
|
||||||
|
#define BO_COMPL 0x0008
|
||||||
|
#define BO_COPY 0x0010
|
||||||
|
#define BO_CTRLG 0x0020
|
||||||
|
#define BO_ERROR 0x0040
|
||||||
|
#define BO_ESC 0x0080
|
||||||
|
#define BO_EX 0x0100
|
||||||
|
#define BO_HANGUL 0x0200
|
||||||
|
#define BO_IM 0x0400
|
||||||
|
#define BO_LANG 0x0800
|
||||||
|
#define BO_MESS 0x1000
|
||||||
|
#define BO_MATCH 0x2000
|
||||||
|
#define BO_OPER 0x4000
|
||||||
|
#define BO_REG 0x8000
|
||||||
|
#define BO_SH 0x10000
|
||||||
|
#define BO_SPELL 0x20000
|
||||||
|
#define BO_WILD 0x40000
|
||||||
|
|
||||||
#ifdef FEAT_WILDIGN
|
#ifdef FEAT_WILDIGN
|
||||||
EXTERN char_u *p_bsk; /* 'backupskip' */
|
EXTERN char_u *p_bsk; /* 'backupskip' */
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ int get_number __ARGS((int colon, int *mouse_used));
|
|||||||
int prompt_for_number __ARGS((int *mouse_used));
|
int prompt_for_number __ARGS((int *mouse_used));
|
||||||
void msgmore __ARGS((long n));
|
void msgmore __ARGS((long n));
|
||||||
void beep_flush __ARGS((void));
|
void beep_flush __ARGS((void));
|
||||||
void vim_beep __ARGS((void));
|
void vim_beep __ARGS((unsigned val));
|
||||||
void init_homedir __ARGS((void));
|
void init_homedir __ARGS((void));
|
||||||
void free_homedir __ARGS((void));
|
void free_homedir __ARGS((void));
|
||||||
void free_users __ARGS((void));
|
void free_users __ARGS((void));
|
||||||
|
|||||||
@@ -2469,7 +2469,7 @@ showmatch(c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((lpos = findmatch(NULL, NUL)) == NULL) /* no match, so beep */
|
if ((lpos = findmatch(NULL, NUL)) == NULL) /* no match, so beep */
|
||||||
vim_beep();
|
vim_beep(BO_MATCH);
|
||||||
else if (lpos->lnum >= curwin->w_topline && lpos->lnum < curwin->w_botline)
|
else if (lpos->lnum >= curwin->w_topline && lpos->lnum < curwin->w_botline)
|
||||||
{
|
{
|
||||||
if (!curwin->w_p_wrap)
|
if (!curwin->w_p_wrap)
|
||||||
|
|||||||
@@ -10201,7 +10201,7 @@ spell_suggest(count)
|
|||||||
* a multi-line selection. */
|
* a multi-line selection. */
|
||||||
if (curwin->w_cursor.lnum != VIsual.lnum)
|
if (curwin->w_cursor.lnum != VIsual.lnum)
|
||||||
{
|
{
|
||||||
vim_beep();
|
vim_beep(BO_SPELL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
badlen = (int)curwin->w_cursor.col - (int)VIsual.col;
|
badlen = (int)curwin->w_cursor.col - (int)VIsual.col;
|
||||||
|
|||||||
@@ -741,6 +741,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 */
|
||||||
|
/**/
|
||||||
|
793,
|
||||||
/**/
|
/**/
|
||||||
792,
|
792,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user