Skip to content

Commit

Permalink
Fixed stopped at braces in case statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob authored and Rob committed May 5, 2020
1 parent d80edef commit c5a2e80
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/jumpmethod.vim
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ function! jumpmethod#jump(char, flags, mode, includeClassesAndProperties)
elseif (a:includeClassesAndProperties)
" No closing ')'. Maybe worth stopping here anyway if it's a class
" definition or property.
if text !~ '\(\<\(else\|do\|try\|finally\|get\|set\)\>\|=\|=>\|;\|{\|}\)\s*{\?\s*$' &&
if text !~ '\(\<\(else\|do\|try\|finally\|get\|set\)\>\|:\|=\|=>\|;\|{\|}\)\s*{\?\s*$' &&
\ text !~ '[=(,]\s*new'
" Probably something of interest
let found = 1
Expand Down
15 changes: 15 additions & 0 deletions test/Test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,21 @@ void FuncWithNoGapBeforeNextFunc()
"Blah",
};

switch (blah)
{
case A:
{ // Don't stop here
cmd;
cmd;
}
return;
default:
{ // Don't stop here
cmd;
}
break;
}

using (a =
blah()) // Don't stop here
{
Expand Down

0 comments on commit c5a2e80

Please sign in to comment.