Skip to content

Commit

Permalink
Avoided stopping at array initialisations and added test case for this
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob authored and Rob committed Feb 19, 2020
1 parent 3705bb1 commit 41be92f
Show file tree
Hide file tree
Showing 2 changed files with 7 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 @@ -125,7 +125,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\|try\|finally\|get\|set\)\>\|=>\|;\|{\|}\)\s*{\?\s*$' &&
if text !~ '\(\<\(else\|try\|finally\|get\|set\)\>\|=\|=>\|;\|{\|}\)\s*{\?\s*$' &&
\ text !~ '[=(,]\s*new'
" Probably something of interest
let found = 1
Expand Down
6 changes: 6 additions & 0 deletions test/Test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ float this[int index] // Stop here
height = _height,
};

string[] names = // Don't stop here
{
"Bob",
"Blah",
};

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

0 comments on commit 41be92f

Please sign in to comment.