diff options
Diffstat (limited to 'lib/syntax_suggest/code_line.rb')
-rw-r--r-- | lib/syntax_suggest/code_line.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/syntax_suggest/code_line.rb b/lib/syntax_suggest/code_line.rb index dc738ab128..d771a2c0dd 100644 --- a/lib/syntax_suggest/code_line.rb +++ b/lib/syntax_suggest/code_line.rb @@ -48,11 +48,9 @@ module SyntaxSuggest strip_line = line.dup strip_line.lstrip! - if strip_line.empty? - @empty = true - @indent = 0 + if (@empty = strip_line.empty?) + @indent = line.length - 1 # Newline removed from strip_line is not "whitespace" else - @empty = false @indent = line.length - strip_line.length end |