mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Fix highlighting of "foo\"bar"
The backslash-escape wasn't being properly caught by the highlighter. Also remove the highlighting of `"\'"`, as `\'` is not a valid escape in double-quotes, and add highlighting for a backslash-escaped newline.
This commit is contained in:
parent
a24998abac
commit
b0be15d4f7
1 changed files with 1 additions and 1 deletions
|
@ -880,7 +880,7 @@ static void color_argument_internal(const wcstring &buffstr, std::vector<highlig
|
|||
if (in_pos + 1 < buff_len)
|
||||
{
|
||||
const wchar_t escaped_char = buffstr.at(in_pos + 1);
|
||||
if (escaped_char == L'\\' || escaped_char == L'\'' || escaped_char == L'$')
|
||||
if (wcschr(L"\\\"\n$", escaped_char))
|
||||
{
|
||||
colors[in_pos] = highlight_spec_escape; //backslash
|
||||
colors[in_pos + 1] = highlight_spec_escape; //escaped char
|
||||
|
|
Loading…
Reference in a new issue