mirror of
https://github.com/tmux/tmux.git
synced 2025-11-24 19:06:07 +00:00
Preserve marked pane with swap-window and move-window, GitHub issue 3443.
This commit is contained in:
@@ -77,6 +77,8 @@ cmd_swap_window_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
wl_src->window = w_dst;
|
wl_src->window = w_dst;
|
||||||
TAILQ_INSERT_TAIL(&w_dst->winlinks, wl_src, wentry);
|
TAILQ_INSERT_TAIL(&w_dst->winlinks, wl_src, wentry);
|
||||||
|
|
||||||
|
if (marked_pane.wl == wl_src)
|
||||||
|
marked_pane.wl = wl_dst;
|
||||||
if (args_has(args, 'd')) {
|
if (args_has(args, 'd')) {
|
||||||
session_select(dst, wl_dst->idx);
|
session_select(dst, wl_dst->idx);
|
||||||
if (src != dst)
|
if (src != dst)
|
||||||
|
|||||||
@@ -289,6 +289,8 @@ server_link_window(struct session *src, struct winlink *srcwl,
|
|||||||
if (dstwl == NULL)
|
if (dstwl == NULL)
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
|
if (marked_pane.wl == srcwl)
|
||||||
|
marked_pane.wl = dstwl;
|
||||||
if (selectflag)
|
if (selectflag)
|
||||||
session_select(dst, dstwl->idx);
|
session_select(dst, dstwl->idx);
|
||||||
server_redraw_session_group(dst);
|
server_redraw_session_group(dst);
|
||||||
|
|||||||
Reference in New Issue
Block a user