After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 346538 - gedit search and replace double backslash leaves trailing backslash
gedit search and replace double backslash leaves trailing backslash
Status: RESOLVED DUPLICATE of bug 332549
Product: gedit
Classification: Applications
Component: general
2.14.x
Other All
: Normal minor
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2006-07-04 12:26 UTC by Radu-Cristian Fotescu
Modified: 2006-07-04 20:15 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14



Description Radu-Cristian Fotescu 2006-07-04 12:26:41 UTC
Please describe the problem:
When you want to replace all of the // (slash pairs) by nothing you still get a trailing /.
Could be a consequence of fixing Debian Bug #361399 in a wrong way.

Steps to reproduce:
1. Open a document
2. Write some text having // and some other characters (it's _mandatory_ to have some other characters on the line, apart from the doublets of backslashes!)
3. Click on Search & Replace
4. Search // and replace by nothing
5. Click on "All"

Actual results:
Instead of nothing, you still get a single slash

Expected results:
All of the matched strings "//" should be took away

Does this happen every time?
Everytime

Other information:
It's _mandatory_ to have some other characters on the line, apart from the doublets of backslashes!
Comment 1 Radu-Cristian Fotescu 2006-07-04 12:56:24 UTC
I'm stupid. Please read BACKSLASHES pairs: "\\" !!!
Comment 2 Steve Frécinaux 2006-07-04 18:38:54 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

This is not a real bug, it's a design decision: '\' needs to be escaped as '\\'
so that we can use \n and \t to search and replace multiline strings.

*** This bug has been marked as a duplicate of 332549 ***
Comment 3 Radu-Cristian Fotescu 2006-07-04 19:59:29 UTC
Steve, may I have the opinion that this is _not_ a correct design decision?

It would be so if the it were about this scenario:
"if you want to and replace \t, write them in the dialog box as \\t, for not taking the for tabs".

But the scenario is this:
"if you select a text containing \t, the search and replace dialog box shows automatically the selected text with \t instead of \\t".

This is a behavioral bug. The select and replace dialog should replace in the selected text \ with \\ before displaying!
Comment 4 Steve Frécinaux 2006-07-04 20:11:42 UTC
May I suggest you that's exactly what Paolo Borelli said in bug #332549 comment #1 ?

Paolo Borelli said: “The bug is that when selcting text and pressing ctrl+F the text should be escaped automatically.”

There was no need to cut-and-paste your reply three times, we gedit team get a mail notification for each comment people put on any gedit-related bug.
Comment 5 Radu-Cristian Fotescu 2006-07-04 20:15:25 UTC
Yes, Steve, thank you very much. Paolo got it right, it should be escaped automatically. However you said it's a design decision, which was a different point of view.