aboutsummaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-05-31 15:56:13 +0100
committerThomas Adam <thomas@xteddy.org>2017-05-31 15:56:13 +0100
commitf17ecaa49544509e93716a84b6510990ed90ceca (patch)
tree6b89857ce59fc9330c136961defdcc0923cbff40 /window.c
parent9c4d0d454aa81b9587ed724e0f87395b1791ce2f (diff)
parentd60663ea8664d1c71def883bd64d97af3f791f89 (diff)
downloadrtmux-f17ecaa49544509e93716a84b6510990ed90ceca.tar.gz
rtmux-f17ecaa49544509e93716a84b6510990ed90ceca.tar.bz2
rtmux-f17ecaa49544509e93716a84b6510990ed90ceca.zip
Merge branch 'obsd-master'
Conflicts: Makefile.am cfg.c server-client.c
Diffstat (limited to 'window.c')
-rw-r--r--window.c35
1 files changed, 5 insertions, 30 deletions
diff --git a/window.c b/window.c
index 10293dea..c949565b 100644
--- a/window.c
+++ b/window.c
@@ -800,8 +800,8 @@ window_pane_create(struct window *w, u_int sx, u_int sy, u_int hlimit)
wp->xoff = 0;
wp->yoff = 0;
- wp->sx = sx;
- wp->sy = sy;
+ wp->sx = wp->osx = sx;
+ wp->sy = wp->osx = sy;
wp->pipe_fd = -1;
wp->pipe_off = 0;
@@ -1186,7 +1186,8 @@ window_pane_mode_timer(__unused int fd, __unused short events, void *arg)
}
int
-window_pane_set_mode(struct window_pane *wp, const struct window_mode *mode)
+window_pane_set_mode(struct window_pane *wp, const struct window_mode *mode,
+ struct cmd_find_state *fs, struct args *args)
{
struct screen *s;
struct timeval tv = { .tv_sec = 10 };
@@ -1199,7 +1200,7 @@ window_pane_set_mode(struct window_pane *wp, const struct window_mode *mode)
evtimer_set(&wp->modetimer, window_pane_mode_timer, wp);
evtimer_add(&wp->modetimer, &tv);
- if ((s = wp->mode->init(wp)) != NULL)
+ if ((s = wp->mode->init(wp, fs, args)) != NULL)
wp->screen = s;
wp->flags |= (PANE_REDRAW|PANE_CHANGED);
@@ -1306,32 +1307,6 @@ window_pane_search(struct window_pane *wp, const char *searchstr)
return (i + 1);
}
-char *
-window_pane_search_old(struct window_pane *wp, const char *searchstr,
- u_int *lineno)
-{
- struct screen *s = &wp->base;
- char *newsearchstr, *line, *msg;
- u_int i;
-
- msg = NULL;
- xasprintf(&newsearchstr, "*%s*", searchstr);
-
- for (i = 0; i < screen_size_y(s); i++) {
- line = grid_view_string_cells(s->grid, 0, i, screen_size_x(s));
- if (fnmatch(newsearchstr, line, 0) == 0) {
- msg = line;
- if (lineno != NULL)
- *lineno = i;
- break;
- }
- free(line);
- }
-
- free(newsearchstr);
- return (msg);
-}
-
/* Get MRU pane from a list. */
static struct window_pane *
window_pane_choose_best(struct window_pane **list, u_int size)