[ruby/reline] Fix [nil] is passed to auto_indent_proc when exit with

CTRL+d
(https://github.com/ruby/reline/pull/571)

* Fix [nil] is passed to auto_indent_proc when exit with CTRL+d

Fix it https://github.com/ruby/reline/issues/556

* not call auto_indent_proc when Ctrl+d.

see: https://github.com/ruby/reline/pull/571#issuecomment-1637183195

https://github.com/ruby/reline/commit/0924f2a075
This commit is contained in:
osyo-manga 2023-07-19 05:33:35 +09:00 committed by git
parent b400307923
commit 45fd006185

View File

@ -1605,7 +1605,7 @@ class Reline::LineEditor
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