The replace function does not replace selected text.
Original Reporter info from Mantis: kluug.net @onpok
-
Reporter name: Ondrej Pokorny
Original Reporter info from Mantis: kluug.net @onpok
- Reporter name: Ondrej Pokorny
Description:
When replacing/searching a text in the source code editor, the replace/search function starts replacing/searching at the caret position and not at the selection start, which is the standard behaviour of all other editors I know (Notepad, Delphi, Notepad++ etc.).
Steps to reproduce:
1.) I have the following text in the editor:
"hello, hello1, hello2, hello3"
2.) I select the first hello with a double click. The selection is now on the word "hello", the caret just after the letter "o" and before ",".
3.) I hit CTRL+R, and write "bye" as a replace string and click on button "replace".
4.) Replacing starts at the second occurence of "hello", i.e. at the word "hello1".
This behaviour is not correct, it has to replace the selected occurence of "hello" as well.
Additional information:
Lazarus behaves differently to other editors like Notepad, Delphi, Notepad++ etc.
Example: if there is selected text in the Delphi editor, it sets automatically the options to:
- Scope = selected text
- Origin = entire scope
You have to switch to these settings manually in Lazarus. Lazarus behaves exactly the same way as Delphi if you change the settings manually.
I suggest Lazarus should set the scope and origin settings automatically to the same values as Delphi does (when there's a selected text).
Mantis conversion info:
- Mantis ID: 27039
- OS: Windows 7
- OS Build: Windows 7
- Build: 46529
- Platform: Windows
- Version: 1.2.6
- Fixed in revision: 51697 (#e7a54734)
- Monitored by: » @martin_frb (Martin Friebe)