Bug#46956: search and replace does not replace the word on which the cursor is

[email protected] 25 Aug 2002 18:39:31 -0000
Newsgroups gmane.comp.kde.devel.kate
Message-ID <[email protected]>
Package: kate
Version: KDE 3.0.2 
Severity: normal
Installed from:    Gentoo Packages
Compiler:          Not Specified
OS:                Not Specified
OS/Compiler notes: Not Specified

Hi,

do the following:
open any text document, place the cursor on a word, which you want to replace with something else. place the cursor somewhere in the middle, not at the beginning of the word.
now press ctrl-r, this opens the find and replace dialog. the word, on which the cursor is, is automatically placed in the search text field. now enter something different for the replace text field.
now click ok.
for me, this starts replacing the word from the _next_ occurrence of the word on to the end of the doc.
but i think the intuitive behaviour is to start replacing with the word the user placed the cursor in to get the word into the search field.

so i guess, the search function starts searching for the word beginning at the actual cursor position. so there should be added some piece of code, which sets this cursor position to the beginning of the word, if the cursor is in a word actually and if there was no selection active, from which the search field got its word.

thanks, Holger

(Submitted via bugs.kde.org)


(Complete bug history is available at http://bugs.kde.org/db/46/46956.html)