In the find / replace dialog is a selection
* Selected Text
* Global
Did you choose the right one?
I am not talking about the find/replace here. What I am saying is that if I have a text snippet (a variable name for example) in the clipboard and want to replace a literal text with it my usual method is this:
- Select the text that is to be replaced
- Use Ctrl-V to paste the clipboard content
But in Lazarus what happens seems to be that when I select the existing text it
copies itself into the clipboard so when I paste with Ctrl-V nothing seems to happen because the text is pasted on top of itself. And what I originally copied is lost.
I have a lot of instances where I have used literal identifiers for things that go into config files, like so:
WriteIniString(Section, 'CommandFile', CmdFileName, TaskFile);
Then the corresponding ReadIniString needs to be:
CmdFileName := ReadIniString(Section, 'CommandFile', CmdFileName, TaskFile);
But these identifiers are also used in other places like on website form declarations and they need to be exactly the same everywhere so I have decided to set them as constant strings which are used everywhere instead of the literal strings:
So in a common used file:
const
dnCmdFile = 'commandfile';
And in the places where it is used:
WriteIniString(Section, dnCmdFile, CmdFileName, TaskFile);
CmdFileName := ReadIniString(Section, dnCmdFile, CmdFileName, TaskFile);
Now, when I am going to clean up my code I use the defined constant names by copying the name and then pasting it on top of the text in all the various places it has been used. And now it is
very inconvenient that Lazarus keeps copying the text I select so the paste does nothing. I want
my copied text to remain in the clipboard so I can move to
all the different places where it must be pasted in...
There must be a setting somewhere to enable/disable this automatic copying into the clipboard...
But where do I look?