vhda / verilog_systemverilog.vim

Verilog/SystemVerilog Syntax and Omni-completion
359 stars 86 forks source link

Decrement operator followed by semicolon is treated as open statement #232

Closed peterfab9845 closed 10 months ago

peterfab9845 commented 10 months ago

A decrement operator with a semicolon directly after it is treated as an open statement, adding an extra level of indentation to the subsequent line.

Example file:

foo--;
    bar();

Re-indenting the bar line with verbose messages on gives the following messages:

GetContextIndent:1: foo--;
Increasing indent for an open statement.

I see the same behavior with a space before the decrement (foo --;), but not with a space between the decrement and the semicolon (foo-- ; or foo -- ;). The increment operator works as expected in all four cases (no extra indent level).

peterfab9845 commented 10 months ago

Thanks for the quick fix!