Ticket #3978 (new defect)

Opened 8 months ago

Spaces depended behavior of syntax highlight

Reported by: krege Owned by:
Priority: minor Milestone: Future Releases
Component: mcedit Version: 4.8.21
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:


There is a different behavior of syntax highlight depending on whether there are spaces/tabs or not. Example:

# string w/o spaces colored as expected: word 'loop' is white
variable nx loop ${c_c}
#and this one with spaces is not: word 'equal' is grey
    variable px equal ${ps}*(${nx}-1)

Both 'variable' are yellow as must be.

Here is the corresponding syntax:

context default
    keyword whole linestart \[\s\t\]variable yellow

context exclusive linestart variable \n grey
    keyword ${*} brightgreen
    keyword #* brown
    keyword whole loop white
    keyword whole equal white

The drop of 'exclusive' word results in block coloring disable (word 'variable' still yellow). Adding '\[\s\t\]' to context do not change.
Am I missing anything?

MC info:

[kryzhev@bear mc]$ LC_MESSAGES=C mc -V
GNU Midnight Commander 4.8.21
Built with GLib 2.56.1
Using the S-Lang library with terminfo database
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ftpfs, sftpfs, fish, smbfs
Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;
[kryzhev@bear mc]$ LC_MESSAGES=C mc -F
Home directory: /home/kryzhev
Profile root directory: /home/kryzhev

[System data]
    Config directory: /etc/mc/
    Data directory:   /usr/share/mc/
    File extension handlers: /usr/libexec/mc/ext.d/
    VFS plugins and scripts: /usr/libexec/mc/
        extfs.d:        /usr/libexec/mc/extfs.d/
        fish:           /usr/libexec/mc/fish/

[User data]
    Config directory: /home/kryzhev/.config/mc/
    Data directory:   /home/kryzhev/.local/share/mc/
        skins:          /home/kryzhev/.local/share/mc/skins/
        extfs.d:        /home/kryzhev/.local/share/mc/extfs.d/
        fish:           /home/kryzhev/.local/share/mc/fish/
        mcedit macros:  /home/kryzhev/.local/share/mc/mc.macros
        mcedit external macros: /home/kryzhev/.local/share/mc/mcedit/macros.d/macro.*
    Cache directory:  /home/kryzhev/.cache/mc/
[kryzhev@bear mc]$ mc --configure-options
 '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--program-prefix=' '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' 'CFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wno-strict-aliasing' '--disable-rpath' '--enable-aspell' '--enable-charset' '--enable-largefile' '--enable-vfs-cpio' '--enable-vfs-extfs' '--enable-vfs-fish' '--enable-vfs-ftp' '--enable-vfs-sfs' '--enable-vfs-sftp' '--enable-vfs-smb' '--enable-vfs-tar' '--with-x' '--with-gpm-mouse' '--with-screen=slang' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'LDFLAGS=-Wl,-z,relro   -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' 'PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'
[kryzhev@bear mc]$}}}
Note: See TracTickets for help on using tickets.