2662Re: [jasspa] suddenly everything quote highlighted! [1 Attachment]
- Oct 31, 2011On 31/10/2011 15:07, Reza Roboubi wrote:
> On 11-10-31 06:11 AM, Jon Green wrote:Hi Reza,
> > If you are able to send some code that reproduces the issue then
> that would be useful.
> Okay, the attached file will narrow it down pretty nicely. Line 52 must
> be scrolled to the top of the page and then the highlighting is wrong.
> This is the version information and buffer mode is a standard .c file:
The issue is the look-back length in the template file. In the file scenario
that you have posted then by scrolling to line 52 then the highlighting is
expected to look back more than 50 lines in order to find an anchor point on
which to base its highlighting scheme for the current line.
If you look at hkc.emf which performs the highlighting then the template is
defined with a 50 line look back at line 110 i.e.
; Hi-light C Mode
0 hilight .hilight.c 2 50
Parameter 1 (=.hilight.c) is the highlight number.
Parameter 2 (=2) is the bitmask and sets the highlight look-back
Parameter 3 (=50) is the "nol" parameter which specifies the number of lines to
50 is a typical value that works for most code. For your code then this is not
enough and you could change it to perform a longer look-back. The problem in
the file disappears if you change the look-back size to 150 (say) i.e.
; Hi-light C Mode
0 hilight .hilight.c 2 150
You can change the look-back to any value, the bigger the value the more
processing is required so it is best to find a reasonable value. The look-back
does stop when it finds a token.
To fix then copy the file hkc.emf to your local .jasspa (or .jasspa/macros)
directory and then edit it to over-ride the default file (typically in
/usr/share/jasspa/macros/hkc.emf for linux). Re-start the editor or re-execute
the macro file and the issue will be resolved.
Hope that helps.
- << Previous post in topic Next post in topic >>