NO

Author Topic: Find and replace bug  (Read 4950 times)

jstaple

  • Guest
Find and replace bug
« on: May 09, 2005, 11:11:40 PM »
First of all I want to say Pelles C rocks
Its a breath of fresh air to use a pure C compiler

I've been messing around with it a home for some time. And wanted to use it in anger at work. So I converted a small VB program to C (That worked fine). However on journey I found a bug...

I wanted to replace all the single quote VB comments with stars e.g

'''''''''''''''''''''''''' -> *****************
So I selected Edit->Replace in the ide menu and entered ' in the find what box and entered * in the replace with box and the results were...

'*'*'*'*'*'*'*'*'*'*'*'*'*'*'*'*'*

Once again Pelles C rocks

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Find and replace bug
« Reply #1 on: May 09, 2005, 11:34:50 PM »
Thank you for your kind words and the bug report. I will look at it/fix it.

Pelle
/Pelle

Ateneo

  • Guest
another replace bug i think
« Reply #2 on: May 12, 2005, 06:46:16 AM »
i dont know if its a bug, but suppouse whe have all "HELLO" sitrings that we want to replace it by "HOLA" (spanish) :D , i make a selection of "HELLO" and then go to replace (that would be nice to have a shortcut to it, or have a button in the "search" dialog). Well the string is well copied to the "source", and then we write "HOLA" in "Dest", when we start to Replace all the strings, the first, the selected "HELLO" is not replaced, instead the following one. So the "replace" engine must end with the last "replaced" string, go to the beggining and replace the first "HELLO". It might be seen like this is unnecesary cos we had all "HELLO" and we replace all by "HOLA", but there are some cases where its is.

Again, thanks god (or you who make it) for Pelles C (and POIDE of course :))

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: another replace bug i think
« Reply #3 on: May 12, 2005, 09:32:34 PM »
Quote from: "Ateneo"
i dont know if its a bug, but suppouse whe have all "HELLO" sitrings that we want to replace it by "HOLA" (spanish) :D , i make a selection of "HELLO" and then go to replace (that would be nice to have a shortcut to it, or have a button in the "search" dialog). Well the string is well copied to the "source", and then we write "HOLA" in "Dest", when we start to Replace all the strings, the first, the selected "HELLO" is not replaced, instead the following one. So the "replace" engine must end with the last "replaced" string, go to the beggining and replace the first "HELLO". It might be seen like this is unnecesary cos we had all "HELLO" and we replace all by "HOLA", but there are some cases where its is.

I'm not sure if it's a bug either - I will look at it when I have some time.

Using Ctrl+F for Find is pretty standard, but the key for Replace seems to differ more between programs. Use Tools -> Customize -> Keyboard if you want to change the accelerator keys...

Pelle
/Pelle

l1ng0

  • Guest
Find and replace bug
« Reply #4 on: February 22, 2006, 06:26:33 AM »
I have customized the shortcut, only to find the bug that I've reported here:

http://smorgasbordet.com/phpBB2/viewtopic.php?p=5077#5077

Thanks,
 - Luke