diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-07-01 20:45:53 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-07-01 20:46:00 +0900 |
commit | 90c51ca39170030b2ea0611bcbb435b76915a287 (patch) | |
tree | 15b477cab1fd7db108c16b49e82c092da3a3726a /lib/reline/line_editor.rb | |
parent | babaad1065b1e45614d03e30f82c9007cc115b7c (diff) |
New indent must be non-negative number
Diffstat (limited to 'lib/reline/line_editor.rb')
-rw-r--r-- | lib/reline/line_editor.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index f068a3c821..bc795b8a3d 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -796,7 +796,7 @@ class Reline::LineEditor new_lines = whole_lines end new_indent = @auto_indent_proc.(new_lines, @line_index, @byte_pointer, @check_new_auto_indent) - if new_indent + if new_indent&.>= 0 md = new_lines[@line_index].match(/\A */) prev_indent = md[0].count(' ') if @check_new_auto_indent |