wrong behaviour searching word in source text

Post bugs related to the IDE here
User avatar
Psychophanta
Addict
Addict
Posts: 4997
Joined: Wed Jun 11, 2003 9:33 pm
Location: Lípetsk, Russian Federation
Contact:

wrong behaviour searching word in source text

Post by Psychophanta »

When doing a "find/replace" a text in the source, if the 'whole words only' is marked, it doesn't work, for example when the word is followed with a * symbol.
Just try and watch it.
http://www.zeitgeistmovie.com

While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB :mrgreen:
BarryG
Addict
Addict
Posts: 3327
Joined: Thu Apr 18, 2019 8:17 am

Re: wrong behaviour searching word in source text

Post by BarryG »

Works here with words ending with *.
User avatar
STARGÅTE
Addict
Addict
Posts: 2089
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: wrong behaviour searching word in source text

Post by STARGÅTE »

Have you add the * in extra character list?
Because then the * is a word-character as well and abc* or *abc is a whole word and abc is not matched.

Image
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
BarryG
Addict
Addict
Posts: 3327
Joined: Thu Apr 18, 2019 8:17 am

Re: wrong behaviour searching word in source text

Post by BarryG »

Interesting, because I don't have * added in the "Extra characters" box, yet it still works for me. I even tried with a clean install (no existing prefs file) and it works.
User avatar
STARGÅTE
Addict
Addict
Posts: 2089
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: wrong behaviour searching word in source text

Post by STARGÅTE »

BarryG wrote: Wed Dec 06, 2023 8:17 am Interesting, because I don't have * added in the "Extra characters" box, yet it still works for me. I even tried with a clean install (no existing prefs file) and it works.
Yes, of cause. If you add the * to the extra word characters, * become a word-character. Therefore the selection as well as the search/replace algorithm interpret e.g. a*b as a whole word. So, from my point of view this is a feature and not a bug.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
BarryG
Addict
Addict
Posts: 3327
Joined: Thu Apr 18, 2019 8:17 am

Re: wrong behaviour searching word in source text

Post by BarryG »

STARGÅTE wrote: Wed Dec 06, 2023 8:37 amIf you add the * to the extra word characters, * become a word-character.
But I'm saying I don't have * added as an extra word character, yet it still gets selected with a word anyway.

Why do my experiences with PureBasic seem so different to everyone else lately? I feel like I'm in the Twilight Zone. :shock:
AZJIO
Addict
Addict
Posts: 1366
Joined: Sun May 14, 2017 1:48 am

Re: wrong behaviour searching word in source text

Post by AZJIO »

BarryG wrote: Wed Dec 06, 2023 9:08 am I feel like I'm in the Twilight Zone
Perhaps you downloaded the updated IDE in the "Editor slow" topic.
I have the same as you and I also downloaded.
BarryG
Addict
Addict
Posts: 3327
Joined: Thu Apr 18, 2019 8:17 am

Re: wrong behaviour searching word in source text

Post by BarryG »

Ohhh, yeah. That's probably it. Thanks for reminding me. <Thumbs up>. Good to know I'm not going insane!
User avatar
Psychophanta
Addict
Addict
Posts: 4997
Joined: Wed Jun 11, 2003 9:33 pm
Location: Lípetsk, Russian Federation
Contact:

Re: wrong behaviour searching word in source text

Post by Psychophanta »

@STARGÅTE , when delete all the characters, and apply -> accept, then the characters appear again.
http://www.zeitgeistmovie.com

While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB :mrgreen:
Post Reply