|
Post by Stefan on Sept 20, 2021 5:21:27 GMT -5
Running version 2.5.2147, but I've no idea how long this may have been the case...
Prerequisites: A file profile which specifies HILITE FIND AUTO
An associated AUTO file that includes COMMENT definition(s) to display comments in certain colour(s) and the chosen colour is an EVEN number, as per OPTIONS SCHEME.
(Note: If the AUTO file specifies an ODD scheme number for the comment, SPFLite works correctly.)
Scenario: Edit a file of that type Issue a FIND command whose <search-string> finds a partial (ie not whole 'word') within a comment section
Cursor will be positioned at the found string which is highlighted in reverse video of its 'AUTO display' comment colour. Press <ENTER>
The reverse video aspect is removed, but only the first character of 'found string' reverts to the original 'AUTO display' comment colour.
The remainder of the 'found string' reverts to the colour whose number is 1 lower (as per OPTIONS SCHEME) than the 'AUTO display' comment colour.
|
|
|
Post by George on Sept 20, 2021 8:49:35 GMT -5
Stefan: Really obscure that one. Corrected. Attributes are stored as 16 bit 'words' per character. It helps to step through them in loops by ensuring you say STEP 2 and not default to STEP 1. If you're willing to go with the latest Beta, here's 2.5.2163. George SPFLite25.exe (599.5 KB)
|
|
|
Post by Stefan on Sept 20, 2021 10:07:52 GMT -5
Perfect - thanks George.
|
|
|
Post by George on Sept 20, 2021 15:07:16 GMT -5
Yep, typo. 2.5.21263
That one has some quirks in KEYMAP. I modified the KEYMAP layout a bit, and the Text boxes for the keys are chopping off the lower part of the text at times. All is really OK, but it looks weird. I have found and corrected it since the upload, just so you know.
George
|
|
|
Post by Stefan on Sept 21, 2021 6:01:27 GMT -5
Hi George,
Spotted on version 2.5.21263 but this worked correctly in v2.5.21246
Sorry to labour this colorisation thing, but I keep tripping over stuff in drips and drabs.
This time it's related to AUTO colourisation.
To demonstrate, I attach LP.Macro and the related MACRO.AUTO file, so you can see the code and the definitions.
Look at code lines 34 to 38 in the LP.MACRO file. Note that SPF_Parse is correctly 'AUTO-coloured', but Arg_Opt, Halt, Get_RC and Get_Msg$ are not coloured.
On lines 85 to 94 you'll find more Function names (SPFLite-specific, and simple BASIC functions) which are not AUTO-coloured. Refer to the MACRO.AUTO file and you'll see that they all should be.
And here's (hopefully) your clue to resolving this...
If, in the LP.MACRO file code, you capitalise the second letter of the function name, AUTO colorisation works correctly. In other words, Get_Msg$ doesn't work but GEt_Msg$ does, similarly, Right$(... doesn't work but RIgth$(... does.
|
|
|
Post by George on Sept 21, 2021 12:32:00 GMT -5
Srefan: Well, after spending much time benchmarking various search routines for the colorize KW search, I optimized myself into an nice efficient routine - which doesn't work properly. Corrected now, a small bit less efficient, but it seems to work much better. It's very obvious now, but it turns out you can't create a hash table to access the KW table, unless you can guarantee the eventual search argument will hash identically. And with case insensitive compares that fails miserably. Here's a corrected version. George SPFLite25.exe (599.5 KB)
|
|
|
Post by Stefan on Sept 22, 2021 3:56:35 GMT -5
Excellent. Thank you.
|
|
|
Post by Stefan on Sept 25, 2021 5:41:17 GMT -5
George, Very sorry... v2.5.21267...
Assuming 21267 includes the changes for 21265, there are two odd colorisation issues...
(1) The last entry in the AUTO file is not operative. e.g. in this case, WARN is not processed 000604 WORD 6 vbTAB 000605 WORD 6 WARN ****** ******************** Bottom of Data ********************
(2) And the Colorise Keyword search routine seems to struggle with words such as WITH, THEN, WHEN, SIGL and TIME, and there may well be others.
These keywords are not coloured/capitalised despite their definitions in the REX.AUTO file.
I thought it might be spelling related, so played around. I noted that THEE is also affected.
|
|
|
Post by George on Sept 25, 2021 10:47:15 GMT -5
Stefan: Thanks. Obviously the search still has problems. No apologies for reporting bugs, that's what Beta's are for.
George
|
|
|
Post by George on Sept 25, 2021 14:56:15 GMT -5
OK, the search routine has been replaced (yet again), so hopefully this one is better. See the latest Beta posting.
George
|
|