User forums > General (but related to Code::Blocks)

Could this be a bug ?

(1/2) > >>

ashotisatoshi:

Situation:

I'm doing a 'Replace' of my code for example
Search for 'foo' replace with 'bar'
and hit alt_r
As code::blocks finds each 'foo' I either hit 'Y' or 'N';

Problem:
If I hold down the 'Y' for a particular section of code which I know
all needs to be replaced, sometimes code::blocks (editor) treats the
'Y' as not a 'YES' but as me typing in the letter y into the code,
thus having the letter 'Y' mixed into my code..

oBFusCATed:
Are you sure the keyboard focus is on the dialog (yes, no, all, cancel) and not on the editor?

ashotisatoshi:

I guess that's the problem,

If I dont hold down the 'Y' key, rather tap it quickly it will replace correctly,
only when I hold it down the editor incorrectly directs the key press.

oBFusCATed:
You can select some code before pressing ctrl-r, then click the all button - the replace will happen only in the selected block of code.

BlueHazzard:

--- Quote from: ashotisatoshi on May 28, 2017, 12:42:17 am ---
I guess that's the problem,

If I dont hold down the 'Y' key, rather tap it quickly it will replace correctly,
only when I hold it down the editor incorrectly directs the key press.

--- End quote ---
this is probably a wxWidgets / operating system issue. The replace dialog looses focus to the newly opened editor and so your y gets interpreted as a key pres.
The question here is, how do you control on what part you replace the text if you keep the key pressed. Isn't it jumping around so fast you can't detect if it is the correct place to replace the code? Wouldn't it be better, you follow the way as obfuscated mentioned and mark the code what is to be replaced and select replace all. So you have more control over the process.

What operating system are you using?

Navigation

[0] Message Index

[#] Next page

Go to full version