mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
[ruby/reline] Fix wrong byte_pointer passed to auto_indent_proc
(https://github.com/ruby/reline/pull/562)
4348354604
This commit is contained in:
parent
6a871baa3c
commit
cd7166cc8f
2 changed files with 19 additions and 1 deletions
|
@ -1645,7 +1645,7 @@ class Reline::LineEditor
|
|||
@line = ' ' * new_indent + @line.lstrip
|
||||
|
||||
new_indent = nil
|
||||
result = @auto_indent_proc.(new_lines[0..-2], @line_index - 1, (new_lines[-2].size + 1), false)
|
||||
result = @auto_indent_proc.(new_lines[0..-2], @line_index - 1, (new_lines[@line_index - 1].bytesize + 1), false)
|
||||
if result
|
||||
new_indent = result
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue