mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 11:21:15 -03:00
Highlight "$foo[1]" properly
Preserve the highlighting applied to the slice brackets when coloring variables inside of double-quoted strings.
This commit is contained in:
@@ -861,7 +861,11 @@ static void color_argument_internal(const wcstring &buffstr, std::vector<highlig
|
||||
*/
|
||||
case e_double_quoted:
|
||||
{
|
||||
colors[in_pos] = highlight_spec_quote;
|
||||
// slices are colored in advance, past `in_pos`, and we don't want to overwrite that
|
||||
if (colors[in_pos] == highlight_spec_param)
|
||||
{
|
||||
colors[in_pos] = highlight_spec_quote;
|
||||
}
|
||||
switch (c)
|
||||
{
|
||||
case L'"':
|
||||
|
||||
Reference in New Issue
Block a user