Skip to content

Commit

Permalink
Correct indentation when comments include vlog_openstat
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitor Antunes committed Feb 9, 2015
1 parent d211f8e commit 120b877
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion indent/verilog_systemverilog.vim
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function GetVerilog_SystemVerilogIndent()
let offset_comment1 = 1
" Define the condition of an open statement
" Exclude the match of //, /* or */
let vlog_openstat = '\(\<or\>\|\([*/]\)\@<![*(,{><+-/%^&|!=?:]\([*/]\)\@!\)'
let vlog_openstat = '\(\<or\>\|\([*/].*\)\@<![*(,{><+-/%^&|!=?:]\([*/]\)\@!\)'
" Define the condition when the statement ends with a one-line comment
let vlog_comment = '\(//.*\|/\*.*\*/\s*\)'
if exists('b:verilog_indent_verbose')
Expand Down
4 changes: 4 additions & 0 deletions test/indent.sv
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Code based on: https://github.com/vhda/verilog_systemverilog.vim/issues/2
class z;

// this is a comment
// -----------------
typedef struct {
real a;
int b;
Expand All @@ -25,3 +27,5 @@ class z;
endfunction;

endclass

// vim: set sts=4 sw=4:

0 comments on commit 120b877

Please sign in to comment.