Some terminals have extended DECSCUSR to allow it to reset to the

default style and put that as the Se capability in their terminfo entry.
Change so that if Ss and Se exist, tmux does not overwrite them with its
own. GitHub issue 5476.
This commit is contained in:
nicm
2026-09-22 14:10:26 +00:00
committed by tmux update bot
parent 83f62d0acc
commit e7618f41c2
3 changed files with 14 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: tty-term.c,v 1.110 2026/09/22 06:58:06 nicm Exp $ */
/* $OpenBSD: tty-term.c,v 1.111 2026/09/22 14:10:26 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -361,7 +361,8 @@ tty_term_override_next(const char *s, size_t *offset)
}
void
tty_term_apply(struct tty_term *term, const char *capabilities, int quiet)
tty_term_apply(struct tty_term *term, const char *capabilities, int quiet,
int flags)
{
const struct tty_term_code_entry *ent;
struct tty_code *code;
@@ -404,6 +405,9 @@ tty_term_apply(struct tty_term *term, const char *capabilities, int quiet)
if (strcmp(s, ent->name) != 0)
continue;
code = &term->codes[i];
if ((flags & TERM_NOREPLACE) &&
code->type != TTYCODE_NONE)
continue;
if (remove) {
code->type = TTYCODE_NONE;
@@ -456,7 +460,7 @@ tty_term_apply_overrides(struct tty_term *term)
offset = 0;
first = tty_term_override_next(s, &offset);
if (first != NULL && fnmatch(first, term->name, 0) == 0)
tty_term_apply(term, s + offset, 0);
tty_term_apply(term, s + offset, 0, 0);
a = options_array_next(a);
}