summaryrefslogtreecommitdiff
path: root/src/terminal.c
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2022-04-13 11:47:25 +0100
committerBram Moolenaar <Bram@vim.org>2022-04-13 11:47:25 +0100
commit77771d33f44bfb9f75eb857bd2f2bb4c2860cac3 (patch)
tree8458b25c002c5dadd13e58398401a5f6c21723b5 /src/terminal.c
parent9bbe5c6b8c44e08c90510c36596d13e54ca0eea4 (diff)
downloadvim-git-77771d33f44bfb9f75eb857bd2f2bb4c2860cac3.tar.gz
patch 8.2.4744: a terminal window can't use the bellv8.2.4744
Problem: A terminal window can't use the bell. Solution: Add bell support for the terminal window. (closes #10178)
Diffstat (limited to 'src/terminal.c')
-rw-r--r--src/terminal.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/terminal.c b/src/terminal.c
index b6efb493e..9f9e84ac3 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -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