mousepad search/replace function broken

Bug #316727 reported by markor
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mousepad (Fedora)
Invalid
Undecided
Unassigned
mousepad (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: mousepad

Using Xubuntu 8.04.1 LTS amd64. (Also observed on 32-bit hardy and newer versions of mousepad)
mousepad versions with bug: all the way up to 0.2.14-0ubuntu1 (tested on Hardy)

mousepad (Xfce default text editor) has, like any editor, Search>Replace function
that opens mini-window with Two Boxes: `Find what` and `Replace with` and `Match case` and `Replace all at once` options.

How to reproduce: Load an medium size text file with multiple repeating text strings.
Start mousepad and activate Search>Replace function, enter string to find and string to replace with.
Make shure `Replace all at once` option is selected.
Press `Find and Replace` button

Results:
Replace is done by not replacing string found in the text file, but adding new string after
found string, thus not doing replace but find&add new string after.

Desired results:
Replace function in mousepad should actually replace strings it founds.

Current workaround:
Do not use mousepad. Use gedit or leafpad or nano editors instead until solved.

I think this is major bug to Xubuntu since, mousepad is default text editor in this Ubuntu variant.

Revision history for this message
Lionel Le Folgoc (mrpouit) wrote :

Hi,

Thanks for your bug report.

I haven't been able to reproduce this issue. Could you provide a file that triggers this bug (if there isn't any sensitive data in it)?

Changed in mousepad:
assignee: nobody → mrpouit
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
markor (markoresko) wrote :

I can reproduce it while editing /boot/grub/menu.lst and string to search and replace
is long (UUID of disk).
UUID=d34a15b0-c44b-42e9-88a2-b122f01ba07b to replace it with string /dev/md2

Actually it is not easy to reproduce.
If you do open mousepad > open text file > select and copy string to replace >
go to Search>Replace and enter new string replacing will be done well.

**But if you firstly use Find function to find string inside text file
**and THEN you use Replace function then you get new string beside old one in text instead of
**replacing it.
** Also bug can be reproduced ONLY if mousepad is run as root, using gksu.
(If you use sudo mousepad, it works fine, only if you invoke it with gksu, bug can be seen)

New steps to reproduce:

(Provided you saved Test123.txt inside /tmp/Test123.txt)
ALT+F2(or from bash) , type: gksu mousepad /tmp/Test123.txt
use Find function to search for string UUID=d34a15b0-c44b-42e9-88a2-b122f01ba07b.
Now Use Search/replace function to replace UUID=d34a15b0-c44b-42e9-88a2-b122f01ba07b
with /dev/md2. (With match case and replace all at once on)
You get old string intact, with added new string to the right.

So, since Bug does not appear when using sudo, Maybe there is some
gksu to mousepad glitch..
 gksu: Version: 2.0.0-5ubuntu3.8.04.1
 mousepad: Version: 0.2.14-0ubuntu1

Also I attached Test123-1.txt with texttoChangE to be replaced with newstring
** Also, notice that bug appears only if New string is shorter then string that you are replacing.

Revision history for this message
markor (markoresko) wrote :
Revision history for this message
markor (markoresko) wrote :

One more addition to this bug.
** Bug can be reproduced only when Options>Word Wrap is selected in mousepad.

Revision history for this message
markor (markoresko) wrote :

I confirm that this bug cannot be reproduced anymore on Hardy.
I was using 2.6.24-22 kernel because of fglrx 8.12 bug (Bug #316344)

After reboot with 2.6.24-23 kernel, bug is not there anymore.
Fo I think it could be marked Fixed in 2.6.24-23.

Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

This bug report is being closed due to your last comment regarding this being fixed with an update. Thank you again for taking the time to report this bug and helping to make Ubuntu better. Feel free to submit any future bugs you may find.

Changed in mousepad:
assignee: mrpouit → nobody
status: Incomplete → Fix Released
Jialong Liu (jialongl)
Changed in mousepad (Ubuntu):
assignee: nobody → fco08 (jeremy08)
assignee: fco08 (jeremy08) → nobody
Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

Please do not assign completed bugs to any project. If you are experiencing this issue in Fedora, report it to the Fedora bug tracker. Thanks.

Changed in mousepad (Fedora):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.