mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-10 21:11:15 -03:00
Highlight the entire variable name, not just the dollar sign. Fixes #1201
This commit is contained in:
@@ -2708,9 +2708,23 @@ static void test_highlighting(void)
|
||||
{L"'single_quote", highlight_spec_error},
|
||||
{NULL, -1}
|
||||
};
|
||||
|
||||
const highlight_component_t components11[] =
|
||||
{
|
||||
{L"echo", highlight_spec_command},
|
||||
{L"$foo", highlight_spec_operator},
|
||||
{L"\"", highlight_spec_quote},
|
||||
{L"$bar", highlight_spec_operator},
|
||||
{L"\"", highlight_spec_quote},
|
||||
{L"$baz[", highlight_spec_operator},
|
||||
{L"1 2..3", highlight_spec_param},
|
||||
{L"]", highlight_spec_operator},
|
||||
{NULL, -1}
|
||||
};
|
||||
|
||||
|
||||
const highlight_component_t *tests[] = {components1, components2, components3, components4, components5, components6, components7, components8, components9, components10};
|
||||
|
||||
const highlight_component_t *tests[] = {components1, components2, components3, components4, components5, components6, components7, components8, components9, components10, components11};
|
||||
for (size_t which = 0; which < sizeof tests / sizeof *tests; which++)
|
||||
{
|
||||
const highlight_component_t *components = tests[which];
|
||||
|
||||
Reference in New Issue
Block a user