You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In iTerm2 and Terminal.app on macOS, when the cursor is one past the end of line (i.e. the next character will be entered on the newline), the cursor position is regarded as being on that line rather than then next. When the backspace key is pressed, the logic that handles this case causes the rendering to move to the previous line and start rendering. This means that backspacing over newlines always breaks usages of dialoguer.
I'm not sure if this is a universal problem, a macOS specific issue, or one that is due to some personal random shell setting (I'm not aware of any that would affect this). Is this something others see?
Output backspace-eol.gif
Set FontSize 32
Set Width 800
Set Height 600
Type "echo Single backspace" Enter
Type "cargo run --quiet --example=input" Enter
Sleep 2s
Type "Test Backspace EOL1" Backspace
Sleep 1s
Type " Line2"
Sleep 2s
Ctrl+C Enter
Sleep 2s
Type "echo Double backspace" Enter
Type "cargo run --quiet --example=input" Enter
Sleep 2s
Type "Test Backspace EOL12" Backspace 2
Sleep 2s
Type " Line2" Enter
Ctrl+C Enter
Sleep 2s
Type "echo Triple backspace" Enter
Type "cargo run --quiet --example=input" Enter
Sleep 2s
Type "Test Backspace EOL123" Backspace 3
Sleep 2s
Type " Line2" Enter
Ctrl+C
Sleep 2s
The text was updated successfully, but these errors were encountered:
In iTerm2 and Terminal.app on macOS, when the cursor is one past the end of line (i.e. the next character will be entered on the newline), the cursor position is regarded as being on that line rather than then next. When the backspace key is pressed, the logic that handles this case causes the rendering to move to the previous line and start rendering. This means that backspacing over newlines always breaks usages of dialoguer.
I'm not sure if this is a universal problem, a macOS specific issue, or one that is due to some personal random shell setting (I'm not aware of any that would affect this). Is this something others see?
iTerm2
Screen.Recording.2023-11-21.at.6.05.39.PM.mov
Terminal.app
Screen.Recording.2023-11-21.at.6.07.38.PM.mov
The code in question is
dialoguer/src/prompts/input.rs
Lines 333 to 337 in c5f7c9a
Repro using VHS:
VHS Tape file
The text was updated successfully, but these errors were encountered: