Page 1 of 1

IDE - Wrong Highlighting in Statusbar using Multi-Line

Posted: Mon Sep 29, 2014 1:56 pm
by c4s
The bold highlightning in the statusbar can be wrong or missing if the (relatively) new multi-line feature is used. Example code:

Code: Select all

WriteStringN(0, Something + ";" + 
                FormatDate("%yyyy-%mm-%dd", Date) + ";" + 
                StrF(Value, 2) + 
                SomethingElse, #PB_UTF8)
The second parameter of StrF() won't be highlighted if the cursor is on that position. It works when the FormatDate() line gets commented but then the next line with SomethingElse and #PB_UTF8 won't be highlighted.

Tested with PB 5.30 x86 on Windows.

Re: IDE - Wrong Highlighting in Statusbar using Multi-Line

Posted: Mon Sep 29, 2014 3:48 pm
by Demivec
Confirmed.

It seems for multi-line this is what happens for the second and additional parts of a multi-line: the highlighting is shown correctly for the start of the line (for whatever parameter is show there); for characters after the first one the highlighting in the status bar isn't triggered until it the cursor has advanced the same number of characters as there are additional lines.

Long winded example:

Code: Select all

;highlighting is correct on the entire line
OpenWindow(0, 1, 2, 3, 4, "Title", #PB_Window_SystemMenu, WindowID(12))

;highlighting is off by 1 character for line 2 on the entire line (not counting first character)
OpenWindow(0,
           1, 2, 3, 4, "Title", #PB_Window_SystemMenu, WindowID(12))  

;highlighting is off by 1 character for lines 2 -> 3 on the entire line (not counting first characters of each line)
OpenWindow(0,
           1, 2, 3, 4, "Title", #PB_Window_SystemMenu, WindowID(12)) 

;highlighting is off by 1 character for line 2, 2 for line 3 on the entire line (not counting first characters of each line)
OpenWindow(0,
           1,
           2, 3, 4, "Title", #PB_Window_SystemMenu, WindowID(12))  

;highlighting is off by (line#:#characters) 2:1, 3:2 (not counting first characters of each line)
OpenWindow(0,
           1,
           2,
           3, 4, "Title", #PB_Window_SystemMenu, WindowID(12))   

;highlighting is off by (line#:#characters) 2:1, 3:2, 4:3 (not counting first characters of each line)
OpenWindow(0,
           1,
           2,
           3,
           4, "Title", #PB_Window_SystemMenu, WindowID(12))    

;highlighting is off by (line#:#characters) 2:1, 3:2, 4:3, 5:4 (not counting first characters of each line)
OpenWindow(0,
           1,
           2,
           3,
           4,
           "Title", #PB_Window_SystemMenu, WindowID(12))     

;highlighting is off by (line#:#characters) 2:1, 3:2, 4:3, 5:4, 6:5 (not counting first characters of each line)
OpenWindow(0,
           1,
           2,
           3,
           4,
           "Title",
           #PB_Window_SystemMenu, WindowID(12))      

;highlighting is off by (line#:#characters) 2:1, 3:2, 4:3, 5:4, 6:5, 7:6 (not counting first characters of each line)
OpenWindow(0,
           1,
           2,
           3,
           4,
           "Title",
           #PB_Window_SystemMenu,
           WindowID(12))       
Spaces (1 for each additional line) had to be added on the last of each multi-line to allow correct highlighting all the way to the close parenthesis.

Also, the highlighting before the first character of each line (column 1) is only correct for the first and second line of a multi-line statement. It is off by 1 parameter for any lines in additional to the first 2 lines of a multi-line statement. This is best shown by placing the cursor at the beginning of a line and moving it down a line at a time.

Re: IDE - Wrong Highlighting in Statusbar using Multi-Line

Posted: Wed Feb 19, 2025 3:31 pm
by Fred
Seems to be already fixed, can anyone else confirm ?