mirror of
https://github.com/tmux/tmux.git
synced 2025-01-07 16:28:48 +00:00
Fix pane movement by direction (up, down, left, right) when
pane-border-status is set, from KOIE Hidetaka.
This commit is contained in:
parent
67d2335130
commit
c916feaf29
16
window.c
16
window.c
@ -1257,7 +1257,7 @@ window_pane_search(struct window_pane *wp, const char *searchstr,
|
|||||||
{
|
{
|
||||||
struct screen *s = &wp->base;
|
struct screen *s = &wp->base;
|
||||||
char *newsearchstr, *line, *msg;
|
char *newsearchstr, *line, *msg;
|
||||||
u_int i;
|
u_int i;
|
||||||
|
|
||||||
msg = NULL;
|
msg = NULL;
|
||||||
xasprintf(&newsearchstr, "*%s*", searchstr);
|
xasprintf(&newsearchstr, "*%s*", searchstr);
|
||||||
@ -1305,17 +1305,18 @@ window_pane_find_up(struct window_pane *wp)
|
|||||||
{
|
{
|
||||||
struct window_pane *next, *best, **list;
|
struct window_pane *next, *best, **list;
|
||||||
u_int edge, left, right, end, size;
|
u_int edge, left, right, end, size;
|
||||||
int found;
|
int status, found;
|
||||||
|
|
||||||
if (wp == NULL || !window_pane_visible(wp))
|
if (wp == NULL || !window_pane_visible(wp))
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
status = options_get_number(wp->window->options, "pane-border-status");
|
||||||
|
|
||||||
list = NULL;
|
list = NULL;
|
||||||
size = 0;
|
size = 0;
|
||||||
|
|
||||||
edge = wp->yoff;
|
edge = wp->yoff;
|
||||||
if (edge == 0)
|
if (edge == (status == 1 ? 1 : 0))
|
||||||
edge = wp->window->sy + 1;
|
edge = wp->window->sy + 1 - (status == 2 ? 1 : 0);
|
||||||
|
|
||||||
left = wp->xoff;
|
left = wp->xoff;
|
||||||
right = wp->xoff + wp->sx;
|
right = wp->xoff + wp->sx;
|
||||||
@ -1351,17 +1352,18 @@ window_pane_find_down(struct window_pane *wp)
|
|||||||
{
|
{
|
||||||
struct window_pane *next, *best, **list;
|
struct window_pane *next, *best, **list;
|
||||||
u_int edge, left, right, end, size;
|
u_int edge, left, right, end, size;
|
||||||
int found;
|
int status, found;
|
||||||
|
|
||||||
if (wp == NULL || !window_pane_visible(wp))
|
if (wp == NULL || !window_pane_visible(wp))
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
status = options_get_number(wp->window->options, "pane-border-status");
|
||||||
|
|
||||||
list = NULL;
|
list = NULL;
|
||||||
size = 0;
|
size = 0;
|
||||||
|
|
||||||
edge = wp->yoff + wp->sy + 1;
|
edge = wp->yoff + wp->sy + 1;
|
||||||
if (edge >= wp->window->sy)
|
if (edge >= wp->window->sy - (status == 2 ? 1 : 0))
|
||||||
edge = 0;
|
edge = (status == 1 ? 1 : 0);
|
||||||
|
|
||||||
left = wp->xoff;
|
left = wp->xoff;
|
||||||
right = wp->xoff + wp->sx;
|
right = wp->xoff + wp->sx;
|
||||||
|
Loading…
Reference in New Issue
Block a user