Wrong line numbers in function list

Syntax highlighting, code folding, brace matching, code indenting, and function list

Wrong line numbers in function list

Postby xkb » Fri Jun 12, 2009 4:06 pm

I've tried to edit sample .c files from Windows DDK and got the trouble with line numbers in function list.
When I'm clicking on function name in Function list, UEdit moves to some lines higher than the function I've selected.
I assume that it is caused by source code formatting. Can I correct this by editing wordfiles or is it a bug in UEdit? :)

Sample .c file is attached.
Attachments
pscrcb.zip
Random sample file from Windows DDK.
(6.1 KiB) Downloaded 175 times
xkb
Newbie
 
Posts: 2
Joined: Fri Jun 12, 2009 3:51 pm

Re: Wrong line numbers in function list

Postby Mofi » Sat Jun 13, 2009 3:35 am

Wow, that is a very strange syntax for a function definition. However, UltraEdit finds the function definitions correct, but has a problem to remember the correct line number. That is a bug and you should report it by email to IDM. The problem is following:

The first function definition string in the wordfile c_cplusplus.uew finds the function definitions spanning over multiple lines.

UltraEdit does not remember the line where the found string starts which would be the correct behavior (here).

Instead UltraEdit gets the line number where the found string ends and then subtracts the number of line ending characters found inside the found string. At least it looks so, I don't really know how UE works inside.

As workaround you can modify the first function string in c_cplusplus.uew from

/Function String = "%^([a-zA-Z_0-9^[^]*]+^)[ ^t]++([^p*&:, ^t^[^]a-zA-Z_0-9./()!<>]++)[~;]"

to

/Function String = "%^([a-zA-Z_0-9^[^]*]+^)[ ^t]++([ ^t]++$"
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4064
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Wrong line numbers in function list

Postby xkb » Sat Jun 13, 2009 5:19 am

Thank you, Mofi! Your workaround solved the problem.
xkb
Newbie
 
Posts: 2
Joined: Fri Jun 12, 2009 3:51 pm


Return to Syntax Highlighting