diff options
Diffstat (limited to 'runtime/indent/awk.vim')
-rw-r--r-- | runtime/indent/awk.vim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/indent/awk.vim b/runtime/indent/awk.vim index 726a5ddbe..edc7acac4 100644 --- a/runtime/indent/awk.vim +++ b/runtime/indent/awk.vim @@ -23,6 +23,7 @@ " 26-04-2002 Got initial version working reasonably well " 29-04-2002 Fixed problems in function headers and max line width " Added support for two-line if's without curly braces +" Fixed hang: 2011 Aug 31 " Only load this indent file when no other was loaded. if exists("b:did_indent") @@ -118,7 +119,7 @@ function! GetAwkIndent() " Case 1 if prev_data =~ ')' && brace_balance < 0 - while brace_balance != 0 + while brace_balance != 0 && prev_lineno > 0 let prev_lineno = s:Get_prev_line( prev_lineno ) let prev_data = getline( prev_lineno ) let brace_balance=brace_balance+s:Get_brace_balance(prev_data,'(',')' ) |