summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-select-pane.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2014-10-21 22:22:05 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2014-10-21 22:22:05 +0000
commitf56feb15e1720c64d26d54dca4fc152a720b9b69 (patch)
tree818af5b24069070d34989e99d87144d559bb69e8 /usr.bin/tmux/cmd-select-pane.c
parentbe1836a41e3b864e6010e78ef7cdd9f0c00d4839 (diff)
Only redraw pane when it has actually changed.
Diffstat (limited to 'usr.bin/tmux/cmd-select-pane.c')
-rw-r--r--usr.bin/tmux/cmd-select-pane.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-select-pane.c b/usr.bin/tmux/cmd-select-pane.c
index ab796a8dbff..f699941d322 100644
--- a/usr.bin/tmux/cmd-select-pane.c
+++ b/usr.bin/tmux/cmd-select-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-select-pane.c,v 1.19 2014/10/20 22:29:25 nicm Exp $ */
+/* $OpenBSD: cmd-select-pane.c,v 1.20 2014/10/21 22:22:04 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -99,8 +99,7 @@ cmd_select_pane_exec(struct cmd *self, struct cmd_q *cmdq)
wp->flags &= ~PANE_INPUTOFF;
else if (args_has(self->args, 'd'))
wp->flags |= PANE_INPUTOFF;
- else {
- window_set_active_pane(wl->window, wp);
+ else if (window_set_active_pane(wl->window, wp)) {
server_status_window(wl->window);
server_redraw_window_borders(wl->window);
}