diff options
author | Thomas Adam <thomas@xteddy.org> | 2022-03-16 20:01:10 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2022-03-16 20:01:10 +0000 |
commit | 5d4c3ef762d9073510518c24b40c1d8bf12e0b65 (patch) | |
tree | a446c630e29fcfd4a3c3a6e27699b4300e968980 /window.c | |
parent | ee3f1d25d568a425420cf14ccba6a1b2a012f7dd (diff) | |
parent | e6e737ac0bf9a5be729b5c71f3a582355432d041 (diff) | |
download | rtmux-5d4c3ef762d9073510518c24b40c1d8bf12e0b65.tar.gz rtmux-5d4c3ef762d9073510518c24b40c1d8bf12e0b65.tar.bz2 rtmux-5d4c3ef762d9073510518c24b40c1d8bf12e0b65.zip |
Merge branch 'obsd-master' into master
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -329,6 +329,7 @@ window_create(u_int sx, u_int sy, u_int xpixel, u_int ypixel) w->id = next_window_id++; RB_INSERT(windows, &windows, w); + window_set_fill_character(w); window_update_activity(w); log_debug("%s: @%u create %ux%u (%ux%u)", __func__, w->id, sx, sy, @@ -360,6 +361,7 @@ window_destroy(struct window *w) event_del(&w->offset_timer); options_free(w->options); + free(w->fill_character); free(w->name); free(w); @@ -1599,3 +1601,20 @@ window_pane_update_used_data(struct window_pane *wp, size = EVBUFFER_LENGTH(wp->event->input) - used; wpo->used += size; } + +void +window_set_fill_character(struct window *w) +{ + const char *value; + struct utf8_data *ud; + + free(w->fill_character); + w->fill_character = NULL; + + value = options_get_string(w->options, "fill-character"); + if (*value != '\0' && utf8_isvalid(value)) { + ud = utf8_fromcstr(value); + if (ud != NULL && ud[0].width == 1) + w->fill_character = ud; + } +} |