termux / termux-app

Termux - a terminal emulator application for Android OS extendible by variety of packages.
https://f-droid.org/en/packages/com.termux
Other
34.7k stars 3.65k forks source link

Weird rendering when using specific shell theme and then recalling command history with long commands #1860

Open coin3x opened 3 years ago

coin3x commented 3 years ago

Problem description

When recalling command history, if encountered long commands, the rendering behaves weird.

Shell: fish 3.1.2 Using oh-my-fish with bobthefish theme

Ascinema recording that contains the problematic sequences Screen recording of asciinema replaying the above cast in Termux

Steps to reproduce

  1. pkg install fish
  2. Install oh-my-fish.
  3. Use omf theme bobthefish to switch theme.
  4. Type a long enough command that exceeds the maximum width and wraps.
  5. Press up to recall and observe weird behaviors, for example, characters disappearing, or the whole line moving backwards for one character.

Expected behavior

Termux should render just like how the above asciinema recording renders on the website.

Additional information

ghost commented 3 years ago

I don't see any Termux bug here.

Issue is with your shell prompt. Screen width is too small for it.

coin3x commented 3 years ago

Well but what it renders on the asciinema website doesn't look like what I saw in Termux. e.g. the whole line won't move backwards for one character. This is very annoying because it doesn't let me edit my commands with confidence (without Ctrl + L first).

Edit: Add comparison video

https://user-images.githubusercontent.com/9127594/103172843-5b0d7b00-4891-11eb-8a5a-fc8fd6434808.mp4

ghost commented 3 years ago

Ok, I will re-open this.

Dan1jel commented 3 years ago

I have / noticed the same issue. Don't know what to do, just here to say that I also noticed this annoying bug and hope this will be looked in to.

Dan1jel commented 3 years ago

I just tried without omf and that works without problem in termux (fish only, but maybe ppl already knew that). But there is something weird with omf and termux...

thunder-coding commented 3 years ago

The same issue also happens when a program using nurses or any terminal manipulating programs and exits without reseting to default settings (before the program started).

Example: Try the o editor, open a file, and close it. On fish the same issue will happen.

This may not a bug in Termux but in one of the program which you use