mirror of
https://github.com/tmux/tmux.git
synced 2026-10-15 16:04:34 +00:00
Extend fill-character to allow inside and outside to be separate and use
a different default (filled characters rather than dots) for inside.
This commit is contained in:
24
window.c
24
window.c
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: window.c,v 1.367 2026/07/21 13:04:01 nicm Exp $ */
|
||||
/* $OpenBSD: window.c,v 1.368 2026/07/23 09:38:27 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -439,8 +439,6 @@ 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);
|
||||
|
||||
if (gettimeofday(&w->creation_time, NULL) != 0)
|
||||
fatal("gettimeofday failed");
|
||||
window_update_activity(w);
|
||||
@@ -474,7 +472,6 @@ window_destroy(struct window *w)
|
||||
event_del(&w->offset_timer);
|
||||
|
||||
options_free(w->options);
|
||||
free(w->fill_character);
|
||||
|
||||
free(w->name);
|
||||
free(w);
|
||||
@@ -2431,25 +2428,6 @@ window_pane_update_used_data(struct window_pane *wp,
|
||||
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;
|
||||
else
|
||||
free(ud);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
window_pane_default_cursor(struct window_pane *wp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user