Mercurial > vim
diff src/terminal.c @ 28439:16bd027b039e v8.2.4744
patch 8.2.4744: a terminal window can't use the bell
Commit: https://github.com/vim/vim/commit/77771d33f44bfb9f75eb857bd2f2bb4c2860cac3
Author: LemonBoy <thatlemon@gmail.com>
Date: Wed Apr 13 11:47:25 2022 +0100
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 https://github.com/vim/vim/issues/10178)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 13 Apr 2022 13:00:06 +0200 |
parents | d1702731786c |
children | f4d2dcfd18ac |
line wrap: on
line diff
--- 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