diff options
author | nicm <nicm> | 2015-10-23 16:02:21 +0000 |
---|---|---|
committer | nicm <nicm> | 2015-10-23 16:02:21 +0000 |
commit | 14da99940806dd63c2180ad238886fcb6735db04 (patch) | |
tree | 0fb85a4357a92b6c2eed2a17967575d0de9aecd7 /format.c | |
parent | 63a3fd3c0fa41fec6cbc15dbd2bf08ceb3ccb208 (diff) |
Format for scroll position, from Jorge Morante.
Diffstat (limited to 'format.c')
-rw-r--r-- | format.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1005,7 +1005,7 @@ format_defaults_pane(struct format_tree *ft, struct window_pane *wp) { struct grid *gd = wp->base.grid; u_int idx; - int status; + int status, scroll_position; if (ft->w == NULL) ft->w = wp->window; @@ -1052,6 +1052,10 @@ 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); + format_add(ft, "alternate_on", "%d", wp->saved_grid ? 1 : 0); format_add(ft, "alternate_saved_x", "%u", wp->saved_cx); format_add(ft, "alternate_saved_y", "%u", wp->saved_cy); |