mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
is_visual_escape_seq: whittle down the escape sequences attempted
Some of these we do not need to worry about actually being used in a prompt.
This commit is contained in:
parent
32ad1a6e62
commit
f309ae05b6
1 changed files with 6 additions and 7 deletions
|
@ -214,13 +214,12 @@ static bool is_color_escape_seq(const wchar_t *code, size_t *resulting_length) {
|
|||
static bool is_visual_escape_seq(const wchar_t *code, size_t *resulting_length) {
|
||||
if (!cur_term) return false;
|
||||
const char *const esc2[] = {
|
||||
enter_bold_mode, exit_attribute_mode, enter_underline_mode, exit_underline_mode,
|
||||
enter_standout_mode, exit_standout_mode, flash_screen, enter_subscript_mode,
|
||||
exit_subscript_mode, enter_superscript_mode, exit_superscript_mode, enter_blink_mode,
|
||||
enter_italics_mode, exit_italics_mode, enter_reverse_mode, enter_shadow_mode,
|
||||
exit_shadow_mode, enter_standout_mode, exit_standout_mode, enter_secure_mode,
|
||||
enter_dim_mode, enter_blink_mode, enter_protected_mode, enter_alt_charset_mode,
|
||||
exit_alt_charset_mode};
|
||||
enter_bold_mode, exit_attribute_mode, enter_underline_mode, exit_underline_mode,
|
||||
enter_standout_mode, exit_standout_mode, enter_blink_mode, enter_protected_mode,
|
||||
enter_italics_mode, exit_italics_mode, enter_reverse_mode, enter_shadow_mode,
|
||||
exit_shadow_mode, enter_standout_mode, exit_standout_mode, enter_secure_mode,
|
||||
enter_dim_mode, enter_blink_mode, enter_alt_charset_mode, exit_alt_charset_mode
|
||||
};
|
||||
|
||||
for (size_t p = 0; p < sizeof esc2 / sizeof *esc2; p++) {
|
||||
if (!esc2[p]) continue;
|
||||
|
|
Loading…
Reference in a new issue