Actions
Bug #20711
closedreadline/reline duplicate display of prompt
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.3.3 (2024-06-12 revision f1c7b6f435) [x86_64-linux]
Description
#!/usr/bin/env ruby
require 'readline'
prompt = "asdf: "
default = "true"
Readline.pre_input_hook = -> do
Readline.insert_text "#{default}"
Readline.redisplay
Readline.pre_input_hook = nil
end
Readline.readline(prompt)
prompt: trueprompt:
the cursor sits at the right place (behind the 'e' in 'true'). inserting a backslash causes the line to be cleared and fixes the display.
expected display, correct in previous versions:
prompt: true
affected:
ruby 3.3.3 (2024-06-12 revision f1c7b6f435) [x86_64-linux] # from rbenv
unaffected:
ruby 3.0.7p220 (2024-04-23 revision 724a071175) [x86_64-linux] # RHEL 9
ruby 3.2.5 (2024-07-26 revision 31d0f1a2e7) [x86_64-linux] # Arch Linux package
Updated by tompng (tomoya ishida) 8 days ago
https://github.com/ruby/reline/pull/742 will fix it.
Updated by yogo1212 (Leon Busch-George) 8 days ago
tompng (tomoya ishida) wrote in #note-1:
https://github.com/ruby/reline/pull/742 will fix it.
Great - thanks :-)
Updated by hsbt (Hiroshi SHIBATA) 6 days ago
- Status changed from Open to Closed
- Backport changed from 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN to 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: REQUIRED
Actions
Like0
Like0Like0Like0