Skip to content
This repository has been archived by the owner on Aug 6, 2023. It is now read-only.

Moving between different displays causes the title of the first block to be corrupted #382

Closed
happybeing opened this issue Sep 20, 2020 · 2 comments
Labels

Comments

@happybeing
Copy link

Describe the bug
I'm using left and right arrow keys to move between different renderings, one with several blocks of stateful lists (display A) and one with just one block showing a stateful list (display B).

The top left block in display A and the block in display B have titles "Vault Status" and "Debug Window" respectively.

Screenshot vdash 1: I begin with display A which renders the title as expected (i.e. the top left of the terminal window has a corner character followed by the text "Vault Status").
vdash 1

I press right arrow to switch the display from A to B:

Screenshot vdash 2: The title of the debug window in display B shown incorrectly. Instead of corner-character followed by "Debug Window" the text becomes "Debugt Window" with the "D" overwriting the corner-character.
vdash 2

I press the right (or left) arrow to move from display B back to display A.

Screenshot vdash 3: Display A now shows the top left block with a corrupted title "Vaultt Status" (with a doubt 't') and also begins where the corner character should be.

My app builds with either crossterm and termion backends and both show this effect.
vdash 3

To Reproduce
Let me know if you want more on this either by building my app (vdash) or in some other way.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Ubuntu 20
  • xterm
  • default
  • tui-rs version: 0.10.0
  • Backend: termion or crossterm

Extra Info

Note 1: the window shown in bottom right of display A with title "Debug Window" is the same block which makes up the whole of display B. When shown on display A, the title of "Debug Window" always displays correctly.

Note 2: I've tested this using other characters to navigate (e.g. 'x') and the effect is the same, so it doesn't appear to be caused by some other processing of the input, but I can't be sure.

Note 3: I'm using tokio futures to handle two streams of input, one for events closely based on the termion and crossterm examples, and another future receiving updates from a file watcher. The latter is not active while this is happening.

The app is easy to build and run, instructions here: vdash

@happybeing happybeing added the bug label Sep 20, 2020
@fdehau
Copy link
Owner

fdehau commented Sep 20, 2020

I've just released a new version that might contain a fix for this. Could you try to upgrade to 0.11.0 ?

@happybeing
Copy link
Author

Man, fixing bugs before I report them is seriously good practice 👏

Thank you, all working now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants