nushell / reedline

A feature-rich line editor - powering Nushell
https://docs.rs/reedline/
MIT License
549 stars 152 forks source link

Buffer pollution in Tmux #397

Open tynanbe opened 2 years ago

tynanbe commented 2 years ago

Platform Linux

Terminal software Tmux

The scrollback buffer is frequently updated/filled merely by navigating through tab completions, or hiding/showing the software keyboard in Termux. The Android device that took the screenshots was remotely connected to an x86_64 machine running Tmux. No command line input has actually been submitted in the following screenshots; enter was only pressed once to accept a tab completion after pressing down a couple times. The last screenshot is what happens when showing/hiding the software keyboard.

Steps to reproduce

  1. Possibly just run Nushell in a Tmux session; not sure if the Android terminal emulator plays into it, but it doesn't happen outside of Tmux (changing nothing else). In my testing, Tmux can be involved locally, remotely, or both.

Screenshots/Screencaptures

Screenshot_2022-04-12_19-05-22

Screenshot_2022-04-12_19-07-17

Screenshot_2022-04-12_19-07-42

sholderbach commented 2 years ago

Yeah that looks gnarly. There are separate issues to investigate:

  1. The soft keyboard will trigger a vertical resize, which reedline still doesn't handle gracefully.
  2. The completion content remains on screen after rejecting/accepting.
  3. Too much completion content/vertical space used. Should be displayed more compact
  4. Unsure if that's an issue: Maybe the completion menu triggers the painting mode for totally exceeding the screen. And its scroll up operation will most likely mess up the scrollback buffer