diff options
author | nicm <nicm> | 2017-03-21 09:49:10 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-03-21 09:49:10 +0000 |
commit | c916feaf2944fde87c26b2cb197d91d3936a690a (patch) | |
tree | f4783e162535412d2e05401f6a350ad5241a9172 | |
parent | 67d2335130295f626cc87468fc069ecdedf2d92a (diff) | |
download | rtmux-c916feaf2944fde87c26b2cb197d91d3936a690a.tar.gz rtmux-c916feaf2944fde87c26b2cb197d91d3936a690a.tar.bz2 rtmux-c916feaf2944fde87c26b2cb197d91d3936a690a.zip |
Fix pane movement by direction (up, down, left, right) when
pane-border-status is set, from KOIE Hidetaka.
-rw-r--r-- | window.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -1257,7 +1257,7 @@ window_pane_search(struct window_pane *wp, const char *searchstr, { struct screen *s = &wp->base; char *newsearchstr, *line, *msg; - u_int i; + u_int i; msg = NULL; xasprintf(&newsearchstr, "*%s*", searchstr); @@ -1305,17 +1305,18 @@ window_pane_find_up(struct window_pane *wp) { struct window_pane *next, *best, **list; u_int edge, left, right, end, size; - int found; + int status, found; if (wp == NULL || !window_pane_visible(wp)) return (NULL); + status = options_get_number(wp->window->options, "pane-border-status"); list = NULL; size = 0; edge = wp->yoff; - if (edge == 0) - edge = wp->window->sy + 1; + if (edge == (status == 1 ? 1 : 0)) + edge = wp->window->sy + 1 - (status == 2 ? 1 : 0); left = wp->xoff; right = wp->xoff + wp->sx; @@ -1351,17 +1352,18 @@ window_pane_find_down(struct window_pane *wp) { struct window_pane *next, *best, **list; u_int edge, left, right, end, size; - int found; + int status, found; if (wp == NULL || !window_pane_visible(wp)) return (NULL); + status = options_get_number(wp->window->options, "pane-border-status"); list = NULL; size = 0; edge = wp->yoff + wp->sy + 1; - if (edge >= wp->window->sy) - edge = 0; + if (edge >= wp->window->sy - (status == 2 ? 1 : 0)) + edge = (status == 1 ? 1 : 0); left = wp->xoff; right = wp->xoff + wp->sx; |