summaryrefslogtreecommitdiffstats
path: root/window-copy.c
diff options
context:
space:
mode:
Diffstat (limited to 'window-copy.c')
-rw-r--r--window-copy.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/window-copy.c b/window-copy.c
index 3ad6084f..6502cccf 100644
--- a/window-copy.c
+++ b/window-copy.c
@@ -2407,14 +2407,17 @@ window_copy_scroll_down(struct window_pane *wp, u_int ny)
screen_write_stop(&ctx);
}
-int
-window_copy_scroll_position(struct window_pane *wp)
+void
+window_copy_add_formats(struct window_pane *wp, struct format_tree *ft)
{
struct window_copy_mode_data *data = wp->modedata;
+ struct screen *s = &data->screen;
if (wp->mode != &window_copy_mode)
- return (-1);
- return (data->oy);
+ return;
+
+ format_add(ft, "selection_present", "%d", s->sel.flag);
+ format_add(ft, "scroll_position", "%d", data->oy);
}
static void