GNOME Bugzilla – Bug 396691
"Search selection only" option in Replace window
Last modified: 2007-01-16 11:13:28 UTC
gedit 2.16.1, Ubuntu 6.10 Right now I'm making a copy of a large block of text, and the five occurrences of a particular word in the second block need to be changed to another word. In SubEthaEdit or TextWrangler I could select the second block and do a Find/Replace limited to the text I'd selected. In GEdit, I can't. (Workaround: Create a new document and do the replacement there, then paste it back into the original document.) Therefore I think there should be a "Search selection only" checkbox in the Replace window.
This comes up from time to time and I think it's a valid request, but there are things that need to be worked out both in the UI that in the implementation: UI: * Adding checkboxes/options to the find dialog makes me a bit unconfortable, especially since there are other valid requests of options to be added there * should this just be on Replace? Can you post screenies of the SubEthaEdit and TextWrangler dialogs? Implementation: while searching in the selection should be easy enough (just grab the start and end iter and make sure to not search further), there is a problem with the display of the selection: given how X works there is always just one available selection: this means that has soon as something is selected in the search entry in the dialog (autocompletion included) the selection in the textview vanishes, making this option way less useable. Not sure how we can work around this...
> This comes up from time to time... In fact there is a bug already :-) I'm am marking this one as duplicate and pasting my previous comment there. Please follow up in the other bug. Thanks! *** This bug has been marked as a duplicate of 150010 ***