Skip to content

Commit 5632438

Browse files
authored
simplify regex
1 parent fc43554 commit 5632438

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

indent/javascript.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ let g:javascript_continuation .= s:line_term
7171

7272
function s:Onescope(lnum,text,add)
7373
return a:text =~# '\%(\<else\|\<do\|=>' . (a:add ? '\|\<try\|\<finally' : '' ) . '\)' . s:line_term ||
74-
\ ((a:add && a:text =~ s:line_pre . s:line_term && search('\%' . s:PrevCodeLine(a:lnum - 1) . 'l.)' . s:line_term)) ||
74+
\ ((a:add && a:text =~ s:line_pre . '$' && search('\%' . s:PrevCodeLine(a:lnum - 1) . 'l.)' . s:line_term)) ||
7575
\ cursor(a:lnum, match(a:text, ')' . s:line_term)) > -1) &&
7676
\ s:lookForParens('(', ')', 'cbW', 100) > 0 && search((a:add ?
7777
\ '\%(function\*\|[[:lower:][:upper:]_$][[:digit:][:lower:][:upper:]_$]*\)' :

0 commit comments

Comments
 (0)