Highlight the entire variable name, not just the dollar sign. Fixes #1201

This commit is contained in:
ridiculousfish
2014-02-03 14:13:42 -08:00
parent c168e6f870
commit bac3b39227
5 changed files with 119 additions and 48 deletions

View File

@@ -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];