[ruby-core:119022] [Ruby master Bug#20711] readline/reline duplicate display of prompt

Issue #20711 has been reported by yogo1212 (Leon Busch-George). ---------------------------------------- Bug #20711: readline/reline duplicate display of prompt https://bugs.ruby-lang.org/issues/20711 * Author: yogo1212 (Leon Busch-George) * Status: Open * ruby -v: ruby 3.3.3 (2024-06-12 revision f1c7b6f435) [x86_64-linux] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- ```ruby #!/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 ``` -- https://bugs.ruby-lang.org/

Issue #20711 has been updated by tompng (tomoya ishida). https://github.com/ruby/reline/pull/742 will fix it. ---------------------------------------- Bug #20711: readline/reline duplicate display of prompt https://bugs.ruby-lang.org/issues/20711#change-109605 * Author: yogo1212 (Leon Busch-George) * Status: Open * ruby -v: ruby 3.3.3 (2024-06-12 revision f1c7b6f435) [x86_64-linux] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- ```ruby #!/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 ``` -- https://bugs.ruby-lang.org/

Issue #20711 has been updated by yogo1212 (Leon Busch-George). tompng (tomoya ishida) wrote in #note-1:
https://github.com/ruby/reline/pull/742 will fix it.
Great - thanks :-) ---------------------------------------- Bug #20711: readline/reline duplicate display of prompt https://bugs.ruby-lang.org/issues/20711#change-109608 * Author: yogo1212 (Leon Busch-George) * Status: Open * ruby -v: ruby 3.3.3 (2024-06-12 revision f1c7b6f435) [x86_64-linux] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- ```ruby #!/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 ``` -- https://bugs.ruby-lang.org/

Issue #20711 has been updated by hsbt (Hiroshi SHIBATA). 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 https://github.com/ruby/ruby/pull/11558 ---------------------------------------- Bug #20711: readline/reline duplicate display of prompt https://bugs.ruby-lang.org/issues/20711#change-109655 * Author: yogo1212 (Leon Busch-George) * Status: Closed * ruby -v: ruby 3.3.3 (2024-06-12 revision f1c7b6f435) [x86_64-linux] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: REQUIRED ---------------------------------------- ```ruby #!/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 ``` -- https://bugs.ruby-lang.org/
participants (3)
-
hsbt (Hiroshi SHIBATA)
-
tompng (tomoya ishida)
-
yogo1212 (Leon Busch-George)