mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 08:41:13 +08:00
Remove fish_color_match support
fish_color_match is a variable which controls syntax highlighting for matching quotes and parens, but only with interactive `read` with shell highlighting disabled. It seems unlikely that anybody cares about this.
This commit is contained in:
parent
af48d09ca6
commit
f94a6a74f0
|
@ -143,6 +143,7 @@ Completions
|
|||
Deprecations and removed features
|
||||
---------------------------------
|
||||
- fish no longer attempts to modify the terminal size via `TIOCSWINSZ`.
|
||||
- The `fish_color_match` variable is no longer used. (Previously this controlled the color of matching quotes and parens when using `read`).
|
||||
|
||||
For distributors and developers
|
||||
-------------------------------
|
||||
|
|
|
@ -627,7 +627,6 @@ static const char *highlight_role_to_string(highlight_role_t role) {
|
|||
TEST_ROLE(statement_terminator)
|
||||
TEST_ROLE(param)
|
||||
TEST_ROLE(comment)
|
||||
TEST_ROLE(match)
|
||||
TEST_ROLE(search_match)
|
||||
TEST_ROLE(operat)
|
||||
TEST_ROLE(escape)
|
||||
|
@ -736,9 +735,6 @@ static const wchar_t *html_class_name_for_color(highlight_spec_t spec) {
|
|||
case highlight_role_t::comment: {
|
||||
return P(comment);
|
||||
}
|
||||
case highlight_role_t::match: {
|
||||
return P(match);
|
||||
}
|
||||
case highlight_role_t::search_match: {
|
||||
return P(search_match);
|
||||
}
|
||||
|
|
|
@ -53,8 +53,6 @@ static const wchar_t *get_highlight_var_name(highlight_role_t role) {
|
|||
return L"fish_color_param";
|
||||
case highlight_role_t::comment:
|
||||
return L"fish_color_comment";
|
||||
case highlight_role_t::match:
|
||||
return L"fish_color_match";
|
||||
case highlight_role_t::search_match:
|
||||
return L"fish_color_search_match";
|
||||
case highlight_role_t::operat:
|
||||
|
@ -115,8 +113,6 @@ static highlight_role_t get_fallback(highlight_role_t role) {
|
|||
return highlight_role_t::normal;
|
||||
case highlight_role_t::comment:
|
||||
return highlight_role_t::normal;
|
||||
case highlight_role_t::match:
|
||||
return highlight_role_t::normal;
|
||||
case highlight_role_t::search_match:
|
||||
return highlight_role_t::normal;
|
||||
case highlight_role_t::operat:
|
||||
|
@ -1359,8 +1355,8 @@ static void highlight_universal_internal(const wcstring &buffstr,
|
|||
pos1 = lst.back();
|
||||
pos2 = str - buff;
|
||||
if (pos1 == pos || pos2 == pos) {
|
||||
color.at(pos1).background = highlight_role_t::match;
|
||||
color.at(pos2).background = highlight_role_t::match;
|
||||
color.at(pos1).background = highlight_role_t::normal;
|
||||
color.at(pos2).background = highlight_role_t::normal;
|
||||
match_found = true;
|
||||
}
|
||||
prev_q = *str == L'\"' ? L'\'' : L'\"';
|
||||
|
@ -1397,8 +1393,8 @@ static void highlight_universal_internal(const wcstring &buffstr,
|
|||
if (test_char == dec_char) level--;
|
||||
if (level == 0) {
|
||||
long pos2 = i;
|
||||
color.at(pos).background = highlight_role_t::match;
|
||||
color.at(pos2).background = highlight_role_t::match;
|
||||
color.at(pos).background = highlight_role_t::normal;
|
||||
color.at(pos2).background = highlight_role_t::normal;
|
||||
match_found = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ enum class highlight_role_t : uint8_t {
|
|||
statement_terminator, // process separator
|
||||
param, // command parameter (argument)
|
||||
comment, // comment
|
||||
match, // matching parenthesis, etc.
|
||||
search_match, // search match
|
||||
operat, // operator
|
||||
escape, // escape sequences
|
||||
|
|
Loading…
Reference in New Issue
Block a user