vim9script syntax highlight bug

18 views
Skip to first unread message

Christian J. Robinson

unread,
Jul 2, 2024, 4:52:22 PMJul 2
to vim_dev, Hirohito Higashi, Doug Kearns

This script doesn't highlight properly:
    vim9script

    def Out(in: bool): bool

        if in
            echo "yay!"
        else
            echo "boo!"
        endif

        return in
    enddef

This one does:
    vim9script

    def Out(in: bool): bool
        if in
            echo "yay!"
        else
            echo "boo!"
        endif

        return in
    enddef

The only difference is a blank line after the def line.

--
Christian J. Robinson <hep...@gmail.com>

Doug Kearns

unread,
Jul 3, 2024, 6:56:33 AMJul 3
to Christian J. Robinson, vim_dev, Hirohito Higashi
Christian,

I can't reproduce this with vim --clean and the latest version of the syntax file (June 21).

I did kludge around a possible bug in the syntax highlighter that exposed itself in a recent change to the def/function body definitions.  So I wasn't entirely surprised to see your report.  I'd probably expect to see it in legacy-script functions as well if it was related to that change.

Thanks,
Doug
Reply all
Reply to author
Forward
0 new messages