mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-15 01:01:15 -03:00
Correctly report the range of tokenizer errors
This enables proper syntax highlighting of tokenizer errors.
This commit is contained in:
@@ -4623,6 +4623,11 @@ static void test_highlighting() {
|
||||
{L"true", highlight_role_t::command},
|
||||
});
|
||||
|
||||
highlight_tests.push_back({
|
||||
{L"false", highlight_role_t::command},
|
||||
{L"|&", highlight_role_t::error},
|
||||
});
|
||||
|
||||
auto &vars = parser_t::principal_parser().vars();
|
||||
// Verify variables and wildcards in commands using /bin/cat.
|
||||
vars.set(L"VARIABLE_IN_COMMAND", ENV_LOCAL, {L"a"});
|
||||
|
||||
Reference in New Issue
Block a user