mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-31 23:28:45 +00:00
set_color: only fixup sitm/ritm/dim if NULL/empty
So we'll skip the hack should someone have a fixed terminfo or only do it on the first set_color command.
This commit is contained in:
parent
de03322073
commit
9c96986b36
1 changed files with 12 additions and 10 deletions
|
@ -110,9 +110,10 @@ maybe_t<int> builtin_set_color(parser_t &parser, io_streams_t &streams, const wc
|
|||
// By the time this is called we should have initialized the curses subsystem.
|
||||
assert(curses_initialized);
|
||||
|
||||
#ifdef __APPLE__
|
||||
// Hack in missing italics and dim capabilities omitted from MacOS xterm-256color terminfo
|
||||
// Helps Terminal.app/iTerm
|
||||
#ifdef __APPLE__
|
||||
if ((!enter_italics_mode || enter_italics_mode == "") || (!enter_dim_mode || enter_dim_mode == "")) {
|
||||
const auto term_prog = parser.vars().get(L"TERM_PROGRAM");
|
||||
if (!term_prog.missing_or_empty() &&
|
||||
(term_prog->as_string() == L"Apple_Terminal" || term_prog->as_string() == L"iTerm.app")) {
|
||||
|
@ -123,6 +124,7 @@ maybe_t<int> builtin_set_color(parser_t &parser, io_streams_t &streams, const wc
|
|||
enter_dim_mode = dim_esc;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Variables used for parsing the argument list.
|
||||
|
|
Loading…
Reference in a new issue