aboutsummaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
authornicm <nicm>2015-06-04 11:43:51 +0000
committernicm <nicm>2015-06-04 11:43:51 +0000
commita863834574ec02b87ff0e7245ef31f0d4543ab34 (patch)
tree4fe2aa4fe98c34bb0d56e5032460889b70dfc317 /window.c
parenta3edfd9e84f4f8e9b74425cdc4b00fe9cb3d0ba6 (diff)
downloadrtmux-a863834574ec02b87ff0e7245ef31f0d4543ab34.tar.gz
rtmux-a863834574ec02b87ff0e7245ef31f0d4543ab34.tar.bz2
rtmux-a863834574ec02b87ff0e7245ef31f0d4543ab34.zip
Add support for a single "marked pane". There is one marked pane in the
server at a time; it may be toggled or cleared with select-pane -m and -M (the border is highlighted). A new target '~' or '{marked}' specifies the marked pane to commands and it is the default target for the swap-pane and join-pane -s flag (this makes them much simpler to use - mark the source pane and then change to the target pane to run swapp or joinp).
Diffstat (limited to 'window.c')
-rw-r--r--window.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/window.c b/window.c
index bc17656d..a1d6792b 100644
--- a/window.c
+++ b/window.c
@@ -543,6 +543,9 @@ window_add_pane(struct window *w, u_int hlimit)
void
window_lost_pane(struct window *w, struct window_pane *wp)
{
+ if (wp == marked_window_pane)
+ server_clear_marked();
+
if (wp == w->active) {
w->active = w->last;
w->last = NULL;
@@ -661,6 +664,8 @@ window_printable_flags(struct session *s, struct winlink *wl)
flags[pos++] = '*';
if (wl == TAILQ_FIRST(&s->lastw))
flags[pos++] = '-';
+ if (server_check_marked() && wl == marked_winlink)
+ flags[pos++] = 'M';
if (wl->window->flags & WINDOW_ZOOMED)
flags[pos++] = 'Z';
flags[pos] = '\0';