Problem
Currently, stdio.prompt (implemented via dialoguer) has issues handling CJK characters. When a user enters Chinese characters and tries to backspace, it causes byte-offset mismatches, leading to "ghost characters" or incorrect cursor positioning in the terminal.
Background
I noticed that Lune's REPL already uses rustyline for a superior interactive experience. However, the lune-std-stdio crate still relies on dialoguer for its Text prompt, creating a functional inconsistency between the REPL and script-driven prompts.
Proposed Change
I have implemented a local fix by swapping the PromptKind::Text branch in lune-std-stdio to use rustyline.
Problem
Currently,
stdio.prompt(implemented viadialoguer) has issues handling CJK characters. When a user enters Chinese characters and tries to backspace, it causes byte-offset mismatches, leading to "ghost characters" or incorrect cursor positioning in the terminal.Background
I noticed that Lune's REPL already uses
rustylinefor a superior interactive experience. However, thelune-std-stdiocrate still relies ondialoguerfor its Text prompt, creating a functional inconsistency between the REPL and script-driven prompts.Proposed Change
I have implemented a local fix by swapping the
PromptKind::Textbranch in lune-std-stdioto userustyline.