1
0
forked from aniani/vim

patch 8.2.4744: a terminal window can't use the bell

Problem:    A terminal window can't use the bell.
Solution:   Add bell support for the terminal window. (closes #10178)
This commit is contained in:
LemonBoy
2022-04-13 11:47:25 +01:00
committed by Bram Moolenaar
parent 9bbe5c6b8c
commit 77771d33f4
6 changed files with 19 additions and 4 deletions

View File

@@ -1696,7 +1696,7 @@ gui_mch_haskey(char_u *name)
void
gui_mch_beep(void)
{
MessageBeep(MB_OK);
MessageBeep((UINT)-1);
}
/*
* Invert a rectangle from row r, column c, for nr rows and nc columns.

View File

@@ -451,7 +451,8 @@ EXTERN unsigned bo_flags;
#define BO_REG 0x8000
#define BO_SH 0x10000
#define BO_SPELL 0x20000
#define BO_WILD 0x40000
#define BO_TERM 0x40000
#define BO_WILD 0x80000
#ifdef FEAT_WILDIGN
EXTERN char_u *p_bsk; // 'backupskip'

View File

@@ -20,7 +20,7 @@ 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};
"spell", "term", "wildmode", NULL};
static char *(p_nf_values[]) = {"bin", "octal", "hex", "alpha", "unsigned", NULL};
static char *(p_ff_values[]) = {FF_UNIX, FF_DOS, FF_MAC, NULL};
#ifdef FEAT_CRYPT

View File

@@ -3385,12 +3385,22 @@ handle_postponed_scrollback(term_T *term)
limit_scrollback(term, &term->tl_scrollback, TRUE);
}
/*
* Called when the terminal wants to ring the system bell.
*/
static int
handle_bell(void *user UNUSED)
{
vim_beep(BO_SH);
return 0;
}
static VTermScreenCallbacks screen_callbacks = {
handle_damage, // damage
handle_moverect, // moverect
handle_movecursor, // movecursor
handle_settermprop, // settermprop
NULL, // bell
handle_bell, // bell
handle_resize, // resize
handle_pushline, // sb_pushline
NULL // sb_popline

View File

@@ -746,6 +746,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4744,
/**/
4743,
/**/