mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
cleanup: Remove os_term_is_nice()
This commit is contained in:
parent
31a508cf6c
commit
9ca836f893
@ -955,13 +955,6 @@ void set_init_2(bool headless)
|
|||||||
p_window = Rows - 1;
|
p_window = Rows - 1;
|
||||||
}
|
}
|
||||||
set_number_default("window", Rows - 1);
|
set_number_default("window", Rows - 1);
|
||||||
#if 0
|
|
||||||
// This bodges around problems that should be fixed in the TUI layer.
|
|
||||||
if (!headless && !os_term_is_nice()) {
|
|
||||||
set_string_option_direct((char_u *)"guicursor", -1, (char_u *)"",
|
|
||||||
OPT_GLOBAL, SID_NONE);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
parse_shape_opt(SHAPE_CURSOR); // set cursor shapes from 'guicursor'
|
parse_shape_opt(SHAPE_CURSOR); // set cursor shapes from 'guicursor'
|
||||||
(void)parse_printoptions(); // parse 'printoptions' default value
|
(void)parse_printoptions(); // parse 'printoptions' default value
|
||||||
}
|
}
|
||||||
|
@ -945,31 +945,6 @@ bool os_setenv_append_path(const char *fname)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns true if the terminal can be assumed to silently ignore unknown
|
|
||||||
/// control codes.
|
|
||||||
bool os_term_is_nice(void)
|
|
||||||
{
|
|
||||||
#if defined(__APPLE__) || defined(WIN32)
|
|
||||||
return true;
|
|
||||||
#else
|
|
||||||
const char *vte_version = os_getenv("VTE_VERSION");
|
|
||||||
if ((vte_version && atoi(vte_version) >= 3900)
|
|
||||||
|| os_getenv("KONSOLE_PROFILE_NAME")
|
|
||||||
|| os_getenv("KONSOLE_DBUS_SESSION")) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
const char *termprg = os_getenv("TERM_PROGRAM");
|
|
||||||
if (termprg && striequal(termprg, "iTerm.app")) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
const char *term = os_getenv("TERM");
|
|
||||||
if (term && strncmp(term, "rxvt", 4) == 0) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns true if `sh` looks like it resolves to "cmd.exe".
|
/// Returns true if `sh` looks like it resolves to "cmd.exe".
|
||||||
bool os_shell_is_cmdexe(const char *sh)
|
bool os_shell_is_cmdexe(const char *sh)
|
||||||
FUNC_ATTR_NONNULL_ALL
|
FUNC_ATTR_NONNULL_ALL
|
||||||
|
Loading…
Reference in New Issue
Block a user