issue-#19 showing unicode identifiers with show sources

Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

issue-#19 showing unicode identifiers with show sources

Post by Ivan Denisov »

DevReferences.SearchIdent still contains some ASCII assumptions

Code: Select all

				(* search legal start symbol *)
				WHILE ~r.eot & ((ch < "A") OR (ch > "Z") & (ch # "_") & (ch < "a") OR (ch > "z")) DO
					INC(beg); r.ReadChar(ch)
				END;
It is leading to the bug, that when you trying to find some unicode procedure with "Source" pop up menu BlackBox just opening file and doesn't skip to procedure position.

So this code should be replaced with:

Code: Select all

				(* search legal start symbol *)
				WHILE ~r.eot & ~ Kernel.IsAlpha(ch) DO
					INC(beg); r.ReadChar(ch)
				END;
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#19 showing unicode identifiers with show sources

Post by Ivan Denisov »

I prepared branch
http://redmine.blackboxframework.org/pr ... d4a5a7ffc8

And tested this version
http://blackboxframework.org/unstable/i ... c1.566.zip

This issue is very simple and IMHO ready for voting.
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#19 showing unicode identifiers with show sources

Post by Josef Templ »

Ivan, why don't you use Strings.IsIdentStart?
The comment suggests that this loop is for looking up the start of an identifier.

- Josef
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#19 showing unicode identifiers with show sources

Post by Ivan Denisov »

Josef Templ wrote:Ivan, why don't you use Strings.IsIdentStart?
The comment suggests that this loop is for looking up the start of an identifier.

- Josef
You right. I simply forgot about Strings.IsIdentStart. I will change and test today.
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#19 showing unicode identifiers with show sources

Post by Josef Templ »

In the changes fold, there are now two lines related to issue-#19.
One reads: "the bug in SearchIdent fixed".
This must be removed because this fix is about
Unicode support for Component Pascal identifiers as listed anyway.
There is no other bug as far as I can see.

- Josef
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#19 showing unicode identifiers with show sources

Post by Ivan Denisov »

Ok :)

Now this is very simple fix
http://redmine.blackboxframework.org/pr ... d4a5a7ffc8

I think it is very clear and ready for voting.
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#19 showing unicode identifiers with show sources

Post by Josef Templ »

agree.
Zinn
Posts: 476
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main
Contact:

Re: issue-#19 showing unicode identifiers with show sources

Post by Zinn »

Have we a similar problem in module HostMenus about hotkey selection?
- Helmut
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#19 showing unicode identifiers with show sources

Post by Josef Templ »

I am afraid, yes.

Also in DevProfiler.

- Josef
Post Reply