Skip to content

Commit

Permalink
New indent must be non-negative number
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu authored and aycabta committed Jul 1, 2019
1 parent babaad1 commit 90c51ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/reline/line_editor.rb
Expand Up @@ -796,7 +796,7 @@ def input_key(key)
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
Expand Down

0 comments on commit 90c51ca

Please sign in to comment.