diff options
author | 2013-03-24 09:18:16 +0000 | |
---|---|---|
committer | 2013-03-24 09:18:16 +0000 | |
commit | 02ae13655d5c683ec92e1d2bb2aede2dd929b94f (patch) | |
tree | cb2aab3d8ce6477f5dcc1c4e7745f6c5a47552bc /usr.bin/tmux/input.c | |
parent | Match documented rc.conf(5) flags. (diff) | |
download | wireguard-openbsd-02ae13655d5c683ec92e1d2bb2aede2dd929b94f.tar.xz wireguard-openbsd-02ae13655d5c683ec92e1d2bb2aede2dd929b94f.zip |
Add support for focus notifications when tmux pane changes, based on
work by Aaron Jensen.
Diffstat (limited to 'usr.bin/tmux/input.c')
-rw-r--r-- | usr.bin/tmux/input.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.bin/tmux/input.c b/usr.bin/tmux/input.c index e2d61345295..49fbbedf357 100644 --- a/usr.bin/tmux/input.c +++ b/usr.bin/tmux/input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: input.c,v 1.61 2013/03/22 10:36:53 nicm Exp $ */ +/* $OpenBSD: input.c,v 1.62 2013/03/24 09:18:16 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -1260,6 +1260,9 @@ input_csi_dispatch(struct input_ctx *ictx) case 1003: screen_write_mode_clear(&ictx->ctx, ALL_MOUSE_MODES); break; + case 1004: + screen_write_mode_clear(&ictx->ctx, MODE_FOCUSON); + break; case 1005: screen_write_mode_clear(&ictx->ctx, MODE_MOUSE_UTF8); break; @@ -1326,6 +1329,12 @@ input_csi_dispatch(struct input_ctx *ictx) screen_write_mode_clear(&ictx->ctx, ALL_MOUSE_MODES); screen_write_mode_set(&ictx->ctx, MODE_MOUSE_ANY); break; + case 1004: + if (s->mode & MODE_FOCUSON) + break; + screen_write_mode_set(&ictx->ctx, MODE_FOCUSON); + wp->flags &= ~PANE_FOCUSED; /* force update if needed */ + break; case 1005: screen_write_mode_set(&ictx->ctx, MODE_MOUSE_UTF8); break; |