mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-01 21:21:15 -03:00
Fix tokenizer crash
This would crash from the highlighter for something like
`PATH={$PATH[echo " "`
The underlying cause is that we use "char_at" which panics on
overread.
So instead this implements try_char_at and then just returns None.
This commit is contained in:
@@ -432,3 +432,6 @@ echo 'begin
|
||||
echo 'multiline-\\
|
||||
-word' | $fish_indent --check
|
||||
echo $status #CHECK: 0
|
||||
|
||||
echo 'PATH={$PATH[echo " "' | $fish_indent --ansi
|
||||
# CHECK: PATH={$PATH[echo " "
|
||||
|
||||
Reference in New Issue
Block a user