From 24c4e6dec109e105c13bd4c1b7f7cd51e534a3c3 Mon Sep 17 00:00:00 2001 From: aycabta Date: Thu, 27 Jun 2019 01:25:22 +0900 Subject: [PATCH] Increase indent of continuation line v = 3 # auto indent --- lib/irb/ruby-lex.rb | 3 +++ 1 file changed, 3 insertions(+) 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