Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix handling escaped delimiter for ex_range function (#113)
Function search_init removes escape character if it escapes a delimiter, but it should consider when an backslash character is not an escape character (this occurs when two backslash). In latter case the escape character should be included in re string. This patch can be tested with the following commands. $ printf '%s\n' '\' > test.txt $ printf '%s\n' '/\\/' 'q' | ex test.txt Before this patch the previous command gives 'Pattern not found', because the last two caracters of the command becomes the single delimiter in the regular expression, i.e. it didn't recognize the delimiter. Co-authored-by: Bosco G. G <jbgg@disroot.org>
- Loading branch information