mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 10:08:47 +00:00
Sync OpenBSD patchset 949:
Add a tty_bell wrapper function, from Dylan Alex Simon.
This commit is contained in:
parent
0a4fd0f7a4
commit
c41a93d130
@ -86,7 +86,7 @@ server_window_check_bell(struct session *s, struct winlink *wl)
|
|||||||
if (c == NULL || c->session != s)
|
if (c == NULL || c->session != s)
|
||||||
continue;
|
continue;
|
||||||
if (!visual) {
|
if (!visual) {
|
||||||
tty_putcode(&c->tty, TTYC_BEL);
|
tty_bell(&c->tty);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (c->session->curw->window == w) {
|
if (c->session->curw->window == w) {
|
||||||
@ -108,7 +108,7 @@ server_window_check_bell(struct session *s, struct winlink *wl)
|
|||||||
if (c->session->curw->window != w)
|
if (c->session->curw->window != w)
|
||||||
continue;
|
continue;
|
||||||
if (!visual) {
|
if (!visual) {
|
||||||
tty_putcode(&c->tty, TTYC_BEL);
|
tty_bell(&c->tty);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
status_message_set(c, "Bell in current window");
|
status_message_set(c, "Bell in current window");
|
||||||
@ -254,6 +254,6 @@ ring_bell(struct session *s)
|
|||||||
for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
|
for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
|
||||||
c = ARRAY_ITEM(&clients, i);
|
c = ARRAY_ITEM(&clients, i);
|
||||||
if (c != NULL && c->session == s)
|
if (c != NULL && c->session == s)
|
||||||
tty_putcode(&c->tty, TTYC_BEL);
|
tty_bell(&c->tty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
1
tmux.h
1
tmux.h
@ -1454,6 +1454,7 @@ void tty_cmd_utf8character(struct tty *, const struct tty_ctx *);
|
|||||||
void tty_cmd_reverseindex(struct tty *, const struct tty_ctx *);
|
void tty_cmd_reverseindex(struct tty *, const struct tty_ctx *);
|
||||||
void tty_cmd_setselection(struct tty *, const struct tty_ctx *);
|
void tty_cmd_setselection(struct tty *, const struct tty_ctx *);
|
||||||
void tty_cmd_rawstring(struct tty *, const struct tty_ctx *);
|
void tty_cmd_rawstring(struct tty *, const struct tty_ctx *);
|
||||||
|
void tty_bell(struct tty *);
|
||||||
|
|
||||||
/* tty-term.c */
|
/* tty-term.c */
|
||||||
extern struct tty_terms tty_terms;
|
extern struct tty_terms tty_terms;
|
||||||
|
Loading…
Reference in New Issue
Block a user