diff options
author | aycabta <aycabta@gmail.com> | 2019-06-27 01:25:22 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-06-27 01:26:14 +0900 |
commit | 24c4e6dec109e105c13bd4c1b7f7cd51e534a3c3 (patch) | |
tree | 70ac0e639a554709c121f1495f9ae977f5be5bc9 /lib | |
parent | df3c94712be83982301abaf49942052f0e6ae0fe (diff) |
Increase indent of continuation line
v =
3 # auto indent
Diffstat (limited to 'lib')
-rw-r--r-- | lib/irb/ruby-lex.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb index 8164fd2a17..41891f8987 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -308,6 +308,9 @@ class RubyLex def check_newline_depth_difference depth_difference = 0 + if @tokens.size >= 2 and @tokens.last[2].end_with?("\n") and @tokens[-2][3].nobits?(Ripper::EXPR_END | Ripper::EXPR_ENDFN) + return 1 + end @tokens.each_with_index do |t, index| case t[1] when :on_ignored_nl, :on_nl |