dankamongmen / notcurses

blingful character graphics/TUI library. definitely not curses.
https://nick-black.com/dankwiki/index.php/Notcurses
Other
3.48k stars 112 forks source link

ncneofetch on kitty 0.24.2 broken when scrolling #2635

Open dankamongmen opened 2 years ago

dankamongmen commented 2 years ago

I'm not sure when this started, and I think it might be due to kitty changes, as I'm almost certain I would have noticed this breakage at 3.0.7's release time, kitty being my default terminal. ncneofetch works fine up until it needs to scroll, at which point things go haywire:

2022-03-20-232055_1453x1410_scrot

dankamongmen commented 2 years ago

it looks like we're printing the bottom plane before scrolling, perhaps?

dankamongmen commented 2 years ago

2022-03-27-044053_1453x1410_scrot

this is with a sleep() prior to infoplane()...

dankamongmen commented 2 years ago

oh shit! this appears to be broken the same way in xterm =\

dankamongmen commented 2 years ago

yeah i think this is general breakage, argh

dankamongmen commented 2 years ago

just after creating the infoplane:

 -------------------------- notcurses debug state -----------------------------
  *************************   0x558bf2133340 pile ****************************
0000 off y:  63 x:  30 geom y:   7 x:  72 curs y:   0 x:   0 0x558bf2162bc0 info
 bound 0x558bf2133250 ← 0x558bf21332c0 → 0x7fe9b00094e0 binds (nil)
0001 off y:  51 x:  32 geom y:  12 x:  68 curs y:   0 x:   0 0x7fe9b00094e0 bmap
 bound 0x558bf2133250 ← 0x558bf2162c20 → (nil) binds (nil)
0002 off y:   0 x:   0 geom y:  64 x: 132 curs y:  63 x:   0 0x558bf2133250 std
 bound 0x558bf2133250 ← 0x558bf2133350 → (nil) binds 0x558bf2162bc0
 ______________________________________________________________________________
dankamongmen commented 2 years ago

so yeah, the infoplane is being created on line 63 as expected (bmap is 51 through 62)...

dankamongmen commented 2 years ago

this is if we render and exit right before ncplane_scrollup_child()

2022-03-27-061334_1453x1410_scrot

dankamongmen commented 2 years ago

yeah, it's ncplane_scrollup_child() that's doing this

dankamongmen commented 2 years ago

if i purge the call to ncplane_scrollup_child(), we get this:

2022-03-27-084004_1453x1410_scrot

dankamongmen commented 2 years ago

when we hit ncplane_scrollup_child(), we're scrolling 11 lines. that's like two times as many as we ought.

dankamongmen commented 2 years ago

no, that's the scroll in the first ncplane_scrollup_child(), and is correct. the next one is 6, and also seems correct.

dankamongmen commented 2 years ago

look at how those scrolls are happening, weird:

tail: f: file truncated
pre-scroll: 63/131 64/132 log: 0 scrolling: 1
pre-scroll: 63/131 64/132 log: 1 scrolling: 1
PAREND: 63 CHEND: 74
SCROLLING 11
pre-scroll: 63/0 64/132 log: 2 scrolling: 1
pre-scroll: 63/0 64/132 log: 3 scrolling: 1
pre-scroll: 63/0 64/132 log: 4 scrolling: 1
pre-scroll: 63/0 64/132 log: 5 scrolling: 1
pre-scroll: 63/0 64/132 log: 6 scrolling: 1
pre-scroll: 63/0 64/132 log: 7 scrolling: 1
pre-scroll: 63/0 64/132 log: 8 scrolling: 1
pre-scroll: 63/0 64/132 log: 9 scrolling: 1
pre-scroll: 63/0 64/132 log: 10 scrolling: 1
pre-scroll: 63/0 64/132 log: 11 scrolling: 1
pre-scroll: 63/0 64/132 log: 12 scrolling: 1
pre-scroll: 63/101 64/132 log: 13 scrolling: 1
 -------------------------- notcurses debug state -----------------------------
  *************************   0x55f12ad43340 pile ****************************
0000 off y:  63 x:  30 geom y:   7 x:  72 curs y:   0 x:  46 0x55f12ad72bc0 info
 bound 0x55f12ad43250 ← 0x55f12ad432c0 → 0x7f4a0c0094e0 binds (nil)
0001 off y:  51 x:  32 geom y:  12 x:  68 curs y:   0 x:   0 0x7f4a0c0094e0 bmap
 bound 0x55f12ad43250 ← 0x55f12ad72c20 → (nil) binds (nil)
0002 off y:   0 x:   0 geom y:  64 x: 132 curs y:  63 x:   0 0x55f12ad43250 std
 bound 0x55f12ad43250 ← 0x55f12ad43350 → (nil) binds 0x55f12ad72bc0
 ______________________________________________________________________________
PAREND: 63 CHEND: 69
SCROLLING 6
pre-scroll: 63/0 64/132 log: 14 scrolling: 1
pre-scroll: 63/0 64/132 log: 15 scrolling: 1
pre-scroll: 63/0 64/132 log: 16 scrolling: 1
pre-scroll: 63/0 64/132 log: 17 scrolling: 1
pre-scroll: 63/0 64/132 log: 18 scrolling: 1
pre-scroll: 63/0 64/132 log: 19 scrolling: 1
 -------------------------- notcurses debug state -----------------------------
  *************************   0x55f12ad43340 pile ****************************
0000 off y:  57 x:  30 geom y:   7 x:  72 curs y:   0 x:  46 0x55f12ad72bc0 info
 bound 0x55f12ad43250 ← 0x55f12ad432c0 → 0x7f4a0c0094e0 binds (nil)
0001 off y:  45 x:  32 geom y:  12 x:  68 curs y:   0 x:   0 0x7f4a0c0094e0 bmap
 bound 0x55f12ad43250 ← 0x55f12ad72c20 → (nil) binds (nil)
0002 off y:   0 x:   0 geom y:  64 x: 132 curs y:  63 x:   0 0x55f12ad43250 std
 bound 0x55f12ad43250 ← 0x55f12ad43350 → (nil) binds 0x55f12ad72bc0
 ______________________________________________________________________________
pre-scroll: 63/103 64/132 log: 20 scrolling: 1
WSLUser commented 2 years ago

While you're looking, can you check if there's anything in the neofetch repo that should be added from a functionality perspective? I noticed it's been awhile since you created the initial ncneofetch and want to ensure you aren't missing something that neofetch now supports.