contour icon indicating copy to clipboard operation
contour copied to clipboard

Corrupted line width after resize

Open Yaraslaut opened this issue 3 years ago • 5 comments

Contour Terminal version

Contour Terminal Emulator 0.3.7.245

Installer source

GitHub: release page

Operating System

Windows 11 21H2

Architecture

x86-64

Other Software

No response

Steps to reproduce

https://user-images.githubusercontent.com/44506630/202843332-882e5af9-18aa-4e49-9a1e-249334f4178a.mp4

Expected Behavior

Full width of the line available for editing

Actual Behavior

Line width is corrupter and not completele available for editing

Additional notes

No response

Yaraslaut avatar Nov 19 '22 09:11 Yaraslaut

oh dear, i think we can group them all together, these family of bugs, all related to resize. But many thanks for the report. ;(

christianparpart avatar Nov 19 '22 20:11 christianparpart

oh dear, i think we can group them all together, these family of bugs, all related to resize. But many thanks for the report. ;(

Are you proposing to use separate label to mark such bugs or to create an issue to monitor other issues with resize ?

Yaraslaut avatar Nov 19 '22 21:11 Yaraslaut

nono. I think after the current think I'm going to tackle resize in a way that I wanted to refactor inflated lines anyways. for this refactor I'd need to re-implement resize anyways.

If I am not mistaken, your ring rewrite is a drop-in replacement (API wise), such that we both won't interfere, right? I'm about to touch only the Line group of APIs plus Grid::resize, I'd say.

christianparpart avatar Nov 19 '22 21:11 christianparpart

Right, this ring can be used as a drop-in replacement (and it already can be used in such way) i also added a function insert_before( line index , val) to resize lines in-place instead of creating new ring, unfortunately current resize routines are very rigid to such changes :) and my fast atempt to adjast resize to new way has failed, so maybe we can syncronize at some point our work ?

Yaraslaut avatar Nov 19 '22 21:11 Yaraslaut

Quick Braindump of our call

  • TrivialLine: a view into a PTY read buffer object
  • InflatedLine: a view into some dense Cell pool.

So when a resize is happening, the InflatedLine "views" are going to re-reference their new range into the dense Cell pool, literally like TrivialLine, just for Cell objects.

Please have this logic tested on the lowest layer possible.

christianparpart avatar Feb 06 '24 23:02 christianparpart