From 6f9b9655d7014f304b371574659fbca853a71091 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 2 Aug 2017 11:10:48 +0000 Subject: Add selection_present format so commands in copy mode can use it, GitHub issue 1028. --- format.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'format.c') diff --git a/format.c b/format.c index 160052c4..6fee6434 100644 --- a/format.c +++ b/format.c @@ -1373,7 +1373,7 @@ format_defaults_pane(struct format_tree *ft, struct window_pane *wp) { struct grid *gd = wp->base.grid; u_int idx; - int status, scroll_position; + int status; if (ft->w == NULL) ft->w = wp->window; @@ -1430,9 +1430,7 @@ format_defaults_pane(struct format_tree *ft, struct window_pane *wp) format_add(ft, "scroll_region_upper", "%u", wp->base.rupper); format_add(ft, "scroll_region_lower", "%u", wp->base.rlower); - scroll_position = window_copy_scroll_position(wp); - if (scroll_position != -1) - format_add(ft, "scroll_position", "%d", scroll_position); + window_copy_add_formats(wp, ft); format_add(ft, "alternate_on", "%d", wp->saved_grid ? 1 : 0); format_add(ft, "alternate_saved_x", "%u", wp->saved_cx); -- cgit