mirror of
https://github.com/tmux/tmux.git
synced 2025-09-03 06:17:04 +00:00
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).
This commit is contained in:
5
window.c
5
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';
|
||||
|
Reference in New Issue
Block a user