aboutsummaryrefslogtreecommitdiff
path: root/format.c
diff options
context:
space:
mode:
authornicm <nicm>2019-03-07 19:01:21 +0000
committernicm <nicm>2019-03-07 19:01:21 +0000
commit7f093fcddcf82c01b6c4d1446af2ebfac5d8a686 (patch)
tree4b0987bae22d0b1c4460f2bdff5e54a0862de938 /format.c
parent5cdd578906985c7abb9d1bba39384e201dada10e (diff)
downloadrtmux-7f093fcddcf82c01b6c4d1446af2ebfac5d8a686.tar.gz
rtmux-7f093fcddcf82c01b6c4d1446af2ebfac5d8a686.tar.bz2
rtmux-7f093fcddcf82c01b6c4d1446af2ebfac5d8a686.zip
Make adding mode formats a function pointer as well.
Diffstat (limited to 'format.c')
-rw-r--r--format.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/format.c b/format.c
index 77f5f59d..f60a4019 100644
--- a/format.c
+++ b/format.c
@@ -1552,7 +1552,8 @@ 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);
- window_copy_add_formats(wp, ft);
+ if (wp->mode != NULL && wp->mode->formats != NULL)
+ wp->mode->formats(wp, ft);
format_add(ft, "alternate_on", "%d", wp->saved_grid ? 1 : 0);
format_add(ft, "alternate_saved_x", "%u", wp->saved_cx);