diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2013-03-24 09:18:17 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2013-03-24 09:18:17 +0000 |
commit | d945039a307ecc91be7f8e9491fbe2f0f917ef1f (patch) | |
tree | 7c27c92657d15273f1402507efe8a51e27c83d1a /usr.bin/tmux/input.c | |
parent | d377344a54cf882b09ec17edeb48694cddadafcf (diff) |
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; |