rc spell: Fix off-by-one highlighting glitch

This commit is contained in:
Frank LENORMAND 2020-05-07 10:40:25 +00:00 committed by GitHub
parent 2fca4e5643
commit 9bc6bddcac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,7 @@ define-command -params ..1 -docstring %{
} }
else if (/^[#&]/) { else if (/^[#&]/) {
word_len = length($2) word_len = length($2) - 1
word_pos = substr($0, 1, 1) == "&" ? substr($4, 1, length($4) - 1) : $3; word_pos = substr($0, 1, 1) == "&" ? substr($4, 1, length($4) - 1) : $3;
regions = regions " " line_num "." word_pos "+" word_len "|Error" regions = regions " " line_num "." word_pos "+" word_len "|Error"
} }