Skip to content

Commit

Permalink
Fix [nil] is passed to auto_indent_proc when exit with CTRL+d (#571)
Browse files Browse the repository at this point in the history
* Fix [nil] is passed to auto_indent_proc when exit with CTRL+d

Fix it #556

* not call auto_indent_proc when Ctrl+d.

see: #571 (comment)
  • Loading branch information
osyo-manga authored Jul 18, 2023
1 parent 7cd8170 commit 0924f2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/reline/line_editor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1605,7 +1605,7 @@ def input_key(key)
else
@just_cursor_moving = false
end
if @is_multiline and @auto_indent_proc and not simplified_rendering?
if @is_multiline and @auto_indent_proc and not simplified_rendering? and @line
process_auto_indent
end
end
Expand Down

0 comments on commit 0924f2a

Please sign in to comment.