Sublime Forum

[Bug] syntax=Tcl, block of code in one line with other blocks, highlighted as a value of variable, not as block of code

#1

Steps:

  1. Syntax = Tcl;

  2. Color theme = jEdit;

  3. Example 1: code with incorrectly highlighted words

    33: proc ::_buttontoggleHandler {cbox args } {
    34: # Invert value only by events with tag=“invoke”
    35: if {$args eq “invoke”} {$cbox invert };
    36: $cbox {*}$args;
    37: };

  4. Example 2: code with correctly highlighted words

    33: proc ::_buttontoggleHandler { cbox args } {
    34: # Invert value only by events with tag=“invoke”
    35: if {$args eq “invoke”} { $cbox invert };
    36: $cbox {*}$args;
    37: };

In Example 1, words “$cbox invert” on the line 35, highlights as an value of variable (foreground=pink).
In Example 2, words “$cbox invert” on the line 35, highlights as a normal block of code.

The only difference between examples - in line 35, beetwen the symbol “{” and words “$cbox invert”.
If block of code spaced between the symbol, which indicate the start of new block of code, then Sublime-Text highlights this block of code as block of code - this is correct.
If block of code has no space between the symbol, which indicate the start of new block of code, then Sumblime-Text highlight this block of code as a value of variable - this is incorrect.

0 Likes