Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

weird behaviour when visuals keep moving down beyond the last row #2195

Open
joseluis opened this issue Sep 20, 2021 · 7 comments
Open

weird behaviour when visuals keep moving down beyond the last row #2195

joseluis opened this issue Sep 20, 2021 · 7 comments
Assignees
Labels
bitmaps bitmapped graphics (sixel, kitty, mmap) bug Something isn't working
Milestone

Comments

@joseluis
Copy link
Collaborator

joseluis commented Sep 20, 2021

I've made an example that showcases the problem. It's intented to be run best using a small terminal size.

It first shows an ncplane moving outside the terminal window, and dissapearing in the horizon without any problem. But when trying to do the same with an ncvisual the result doesn't look right.

In kitty, when the plane reaches the bottom border, the plane stops displacing over the Y axis but it keeps moving over the X axis even after the right border is surpassed, but then it displaces negatively 1 cell in the Y axis.

In the rest of the terminals I've tried (wezterm, xterm) when the visual reaches the bottom border it leaves a long trail of rendered visuals in its path.

@joseluis joseluis added the bug Something isn't working label Sep 20, 2021
@dankamongmen
Copy link
Owner

yep, this is known. i think i have a bug open on it somewhere else; let me look.

@dankamongmen dankamongmen self-assigned this Sep 21, 2021
@dankamongmen dankamongmen added the bitmaps bitmapped graphics (sixel, kitty, mmap) label Sep 21, 2021
@dankamongmen dankamongmen added this to the 3.0.0 milestone Sep 21, 2021
@dankamongmen
Copy link
Owner

so here are the facts of the situation:

  • for sixels, we must never generally allow the last row to be broached; doing so will lead to madness
  • for kitty, doing so is fine so long as we supply C=1
  • otherwise (older kitty), we must not allow the last row to be breached

so the difficulty here is what to do when that last line is broached. we want to allow its "logical" broaching, where (say) a 2-row graphic is placed on the penultimate line, resulting in only its top line being displayed. doing so requires cutting up the graphic on the fly, which requires the ability to restore it (imagine moving to the bottom, then moving up towards the top).

in a mosaic world (#1563), this is beyond trivial. in a non-mosaic world, this is tough, but obviously doable. the big difference between this and regular wipes is that we must actually excise the lower lines entirely.

ideally i'd resolve this via mosaics.

@joseluis
Copy link
Collaborator Author

The mosaic world looks fantastic. This could wait for it. But I see you removed that from the 3.0 milestone. I guess it's not gonna be so easy, huh.

@dankamongmen
Copy link
Owner

The mosaic world looks fantastic. This could wait for it. But I see you removed that from the 3.0 milestone. I guess it's not gonna be so easy, huh.

it will be the most difficult part of this project, and even if i do it perfectly, experimentation suggests that some terminals will slow to a crawl using this method =[ but it's absolutely the way to go, and will fix pretty much all existing problems with bitmap graphics.

i expect it to be the primary effort of 3.x development.

@dankamongmen
Copy link
Owner

see also #1539

@dankamongmen dankamongmen removed this from the 3.0.0 milestone Nov 25, 2021
@dankamongmen
Copy link
Owner

this is not the same as #2379, but rather a superset of it. that one just covers not creating sixel visuals that overlap the lowest row.

this is moving to trans3.0, and it'll be done with mosaics.

until then, we might want to prevent this from happening via a guard in ncplane_move_yx(), but we'd probably need place it in multiple places...idk.

@dankamongmen dankamongmen added this to the 4.0.0 milestone Dec 9, 2021
@dankamongmen
Copy link
Owner

see also #2566

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bitmaps bitmapped graphics (sixel, kitty, mmap) bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants