'Find' followed by 'Replace All' fails to replace the first instance

Bug #49619 reported by Shish
8
Affects Status Importance Assigned to Milestone
AbiWord
Fix Released
Critical
abiword (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Update: See comment by Henrik for more procedure to reproduce

Type "foo foo foo", go edit -> replace, search "foo" replace "bar", hit "replace all", result "bar bar bar".

Type "foo foo foo", hilight the text, go edit -> replace, search "foo" replace "bar", hit "replace all", result "bar foo foo".

Revision history for this message
Rylie Pavlik (abiryan) wrote :

Cannot reproduce in AbiWord 2.4.4 in Ubuntu Dapper - what is your platform?

Revision history for this message
Shish (shish) wrote :

2.4.4 on dapper. More testing shows it to be seemingly random; I type "foo foo foo", go edit -> replace, replace "foo" with "bar", hit "replace all" and it works. I then go edit->undo so they're all back to "foo", hit "replace all", and then only the first and third change but the middle foo is still foo. Then I go edit->undo, and hit "replace all" again, this time only the first changes. Undo that, replace all, and all three change.

This pattern of all three changing, first and third changing, only first changing, all changing again seems to continue.

Revision history for this message
Carthik Sharma (carthik) wrote :

I can't seem to reproduce this. The only problem you might have is when you hit the "Find and Replace" button - you hit it once, it finds the text, you hit it again, and it replaces the highlighted text (that it found previously). You hit find and replace once, and then hit replace all, and it only replaces the ones that are not highlighted. This doesn't seem buggy.

If you agree this is not a bug, shall we close it?

Thank you for letting us know.

Dean Sas (dsas)
Changed in abiword:
assignee: nobody → desktop-bugs
status: Unconfirmed → Needs Info
Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

I can confirm this on Edgy with abiword 2.4.5. Exact procedure to reproduce:

* Open Abiword
* Type 'foo foo foo'
* Go to search/replace
* Type 'foo' in the search box and 'bar' in the replace box
* Hit FIND (it finds the first foo)
* Then hit REPLACE ALL

Expected result: 'bar bar bar'

Actual result: 'foo bar bar'

This happens each time. If you press REPLACE ALL at the very beginning though you get 'bar bar bar', whether anything is selected or not.

I would call this a bug because the user might search for a word first and when the result appears discover that there are several instances. When she subsequently hits Replace All she would expect all the words in the document to be replaced.

(I'll file this upstream)

Changed in abiword:
status: Needs Info → Confirmed
description: updated
Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

Still present on 2.4.6 in Feisty.

Changed in abiword:
importance: Undecided → Low
Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

Still present in Gutsy.

Revision history for this message
Rylie Pavlik (abiryan) wrote :

Fixed upstream in 2.6 branch and trunk - r22162 and r22178 (combined)

Changed in abiword:
status: New → Unknown
Changed in abiword:
status: Confirmed → Fix Committed
Changed in abiword:
status: Unknown → Fix Released
Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

Fix confirmed in Hardy!

Changed in abiword:
status: Fix Committed → Fix Released
Changed in abiword:
importance: Unknown → Critical
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.