summaryrefslogtreecommitdiffstats
path: root/input.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2013-02-22 07:23:11 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2013-02-22 07:23:11 +0000
commit4c9f9438ff977365394f903b5849611741924b9c (patch)
tree3d7c6b91bc16440dd7650e973cbe33646c1f6d5d /input.c
parent8c50f625b0698e35ad183864e3baa4bb8679e0ae (diff)
Add support for focus notifications when tmux pane changes, based on work by
Aaron Jensen.
Diffstat (limited to 'input.c')
-rw-r--r--input.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/input.c b/input.c
index 4cf90ece..4aa02e90 100644
--- a/input.c
+++ b/input.c
@@ -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;