diff --git a/lib/tty/reader/line.rb b/lib/tty/reader/line.rb index fb2bc57..490fadd 100644 --- a/lib/tty/reader/line.rb +++ b/lib/tty/reader/line.rb @@ -75,7 +75,7 @@ def prompt_display_width # return the length of each line + screen width for every line # past the first which accounts for multi-line prompts - lines.join.length + ((lines.length - 1) * TTY::Screen.width) + lines.last.length + ((lines.length - 1) * TTY::Screen.width) end # Check if line is in edit mode