andreikop / enki

A text editor for programmers
http://enki-editor.org
GNU General Public License v2.0
161 stars 38 forks source link

Text replace fails when the replacement text ends in slash #55

Closed vi closed 11 years ago

vi commented 12 years ago
  1. Open Enki (new file)
  2. Type "q"
  3. Press Ctrl+R; ensure that "Reg. exp." checkbox is unchecked
  4. Type "q" as search string
  5. Type "\" as replace string
  6. Press Enter

The "bogus escape (end of line). Probably \group_index...." message is displayed.

I expect escapes in substitution text field to work only when "Reg.exp." checkbox is checked.

andreikop commented 11 years ago

Substitution and reg exps are different functionality. You might want to insert \n or \t to your text even if you don't use regular expressions when searching.

I fixed substitution algorithm, now it doesn't throw any errors, but ignores not known escape sequences.