diff options
author | Thomas Adam <thomas@xteddy.org> | 2017-01-12 12:01:10 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2017-01-12 12:01:10 +0000 |
commit | 1eb9500644f058113c0b108a049e05efda5e3436 (patch) | |
tree | 47d128b5f4e7ffac044dfacbef88c13ac83ecc01 | |
parent | 4a768619251d19769765bd6ed0d58f0a8bfab235 (diff) | |
parent | dad3090d3201bd8272cb762beea8ef3aa8ce9673 (diff) | |
download | rtmux-1eb9500644f058113c0b108a049e05efda5e3436.tar.gz rtmux-1eb9500644f058113c0b108a049e05efda5e3436.tar.bz2 rtmux-1eb9500644f058113c0b108a049e05efda5e3436.zip |
Merge branch 'obsd-master'
-rw-r--r-- | tmux.h | 2 | ||||
-rw-r--r-- | window.c | 40 |
2 files changed, 21 insertions, 21 deletions
@@ -2136,6 +2136,7 @@ void window_pane_alternate_off(struct window_pane *, void window_pane_set_palette(struct window_pane *, u_int, int); void window_pane_unset_palette(struct window_pane *, u_int); void window_pane_reset_palette(struct window_pane *); +int window_pane_get_palette(const struct window_pane *, int); int window_pane_set_mode(struct window_pane *, const struct window_mode *); void window_pane_reset_mode(struct window_pane *); @@ -2154,7 +2155,6 @@ void window_set_name(struct window *, const char *); void window_remove_ref(struct window *); void winlink_clear_flags(struct winlink *); int winlink_shuffle_up(struct session *, struct winlink *); -int window_pane_get_palette(const struct window_pane *, int); /* layout.c */ u_int layout_count_cells(struct layout_cell *); @@ -1148,6 +1148,26 @@ window_pane_reset_palette(struct window_pane *wp) wp->flags |= PANE_REDRAW; } +int +window_pane_get_palette(const struct window_pane *wp, int c) +{ + int new; + + if (wp == NULL || wp->palette == NULL) + return (-1); + + new = -1; + if (c < 8) + new = wp->palette[c]; + else if (c >= 90 && c <= 97) + new = wp->palette[8 + c - 90]; + else if (c & COLOUR_FLAG_256) + new = wp->palette[c & ~COLOUR_FLAG_256]; + if (new == 0) + return (-1); + return (new); +} + static void window_pane_mode_timer(__unused int fd, __unused short events, void *arg) { @@ -1532,23 +1552,3 @@ winlink_shuffle_up(struct session *s, struct winlink *wl) return (idx); } - -int -window_pane_get_palette(const struct window_pane *wp, int c) -{ - int new; - - if (wp == NULL || wp->palette == NULL) - return (-1); - - new = -1; - if (c < 8) - new = wp->palette[c]; - else if (c >= 90 && c <= 97) - new = wp->palette[8 + c - 90]; - else if (c & COLOUR_FLAG_256) - new = wp->palette[c & ~COLOUR_FLAG_256]; - if (new == 0) - return (-1); - return (new); -} |