mirror of
https://github.com/tmux/tmux.git
synced 2026-05-13 00:44:44 +00:00
Merge branch 'obsd-master'
This commit is contained in:
@@ -355,6 +355,9 @@ control_set_pane_off(struct client *c, struct window_pane *wp)
|
||||
struct control_pane *cp;
|
||||
|
||||
cp = control_add_pane(c, wp);
|
||||
control_discard_pane(c, cp);
|
||||
memcpy(&cp->offset, &wp->offset, sizeof cp->offset);
|
||||
memcpy(&cp->queued, &wp->offset, sizeof cp->queued);
|
||||
cp->flags |= CONTROL_PANE_OFF;
|
||||
}
|
||||
|
||||
|
||||
25
screen.c
25
screen.c
@@ -277,6 +277,16 @@ screen_push_title(struct screen *s)
|
||||
{
|
||||
struct screen_title_entry *title_entry;
|
||||
|
||||
log_debug("%s: %u", __func__, s->ntitles);
|
||||
|
||||
while (s->ntitles >= 10) {
|
||||
title_entry = TAILQ_LAST(s->titles, screen_titles);
|
||||
free(title_entry->text);
|
||||
TAILQ_REMOVE(s->titles, title_entry, entry);
|
||||
free(title_entry);
|
||||
s->ntitles--;
|
||||
}
|
||||
|
||||
if (s->titles == NULL) {
|
||||
s->titles = xmalloc(sizeof *s->titles);
|
||||
TAILQ_INIT(s->titles);
|
||||
@@ -284,6 +294,7 @@ screen_push_title(struct screen *s)
|
||||
title_entry = xmalloc(sizeof *title_entry);
|
||||
title_entry->text = xstrdup(s->title);
|
||||
TAILQ_INSERT_HEAD(s->titles, title_entry, entry);
|
||||
s->ntitles++;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -297,14 +308,15 @@ screen_pop_title(struct screen *s)
|
||||
|
||||
if (s->titles == NULL)
|
||||
return;
|
||||
log_debug("%s: %u", __func__, s->ntitles);
|
||||
|
||||
title_entry = TAILQ_FIRST(s->titles);
|
||||
if (title_entry != NULL) {
|
||||
screen_set_title(s, title_entry->text);
|
||||
|
||||
free(s->title);
|
||||
s->title = title_entry->text;
|
||||
TAILQ_REMOVE(s->titles, title_entry, entry);
|
||||
free(title_entry->text);
|
||||
free(title_entry);
|
||||
s->ntitles--;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -787,6 +799,8 @@ screen_mode_to_string(int mode)
|
||||
strlcat(tmp, "CURSOR_BLINKING,", sizeof tmp);
|
||||
if (mode & MODE_CURSOR_VERY_VISIBLE)
|
||||
strlcat(tmp, "CURSOR_VERY_VISIBLE,", sizeof tmp);
|
||||
if (mode & MODE_CURSOR_BLINKING_SET)
|
||||
strlcat(tmp, "CURSOR_BLINKING_SET,", sizeof tmp);
|
||||
if (mode & MODE_MOUSE_UTF8)
|
||||
strlcat(tmp, "MOUSE_UTF8,", sizeof tmp);
|
||||
if (mode & MODE_MOUSE_SGR)
|
||||
@@ -807,7 +821,10 @@ screen_mode_to_string(int mode)
|
||||
strlcat(tmp, "KEYS_EXTENDED_2,", sizeof tmp);
|
||||
if (mode & MODE_THEME_UPDATES)
|
||||
strlcat(tmp, "THEME_UPDATES,", sizeof tmp);
|
||||
tmp[strlen(tmp) - 1] = '\0';
|
||||
if (mode & MODE_SYNC)
|
||||
strlcat(tmp, "SYNC,", sizeof tmp);
|
||||
if (*tmp != '\0')
|
||||
tmp[strlen(tmp) - 1] = '\0';
|
||||
return (tmp);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user