GNOME Bugzilla – Bug 300977
document that \ has to be escaped when searching for it
Last modified: 2008-05-02 09:51:27 UTC
Please describe the problem: searching for "\\" finds nothing, which is wrong. replacing "\\" can be done by using "\\\" Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? yes Other information:
to clarify: select a string "foo\\bar" and search: no matches will be found because of escaping. Escaping is a feature, but we should try to improve escape code for these cases
This is still present in 2.10.3. Arguably normal behavior and only a documentation bug (help file only specifies \n \t and \r escape codes), but still potentially confusing, so I'm confirming this.
This bug still present in 2.14.2. The replacement of \ doesn't affect the text.
Reassigning to docs: after discussing it, this is the expected behavior but the documentation should explain which characters need to be escaped.
Created attachment 109933 [details] [review] Add backslash search documentation Here's a proposal to document this (in the Special Chars section).
I think the section should be expanded further: it should state that \n, \t etc are special characters, and if you want to literally match "\n" you have to escape the slash and search for "\\n"
Created attachment 109962 [details] [review] Reworked patch Agreed. What about this version?
ops, I thought I already approved this one, sorry. Looks good to me, please commit.
Thanks, committed in trunk.