You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe various issues would be simplified if we unified trim, delete, and insert events on a Buffer's lines. Most obviously, a trim is just a delete where the event index is 0. Similarly, an insert can be treated as a delete with a negative amount. I believe any code that needs to handle one of these events needs to handle them all - just look at at the code for Buffer.addMarker.
Also notice the ElementInsert.put method (in Buffer.ts) in my sixel pull request #1940.
Not sure whether to call the unified event 'delete' or come up with a more neutral name.
I noticed that the selection is discarded when the window is resized. That is a symptom of not handling these events in a unified manner: The SelectionManager watches for trim events, but does not handle delete or insert events. That should be fixed.
A related issue is that deleteLines/insertLines/eraseInDisplay should perhaps also signal a delete event. I need something similar so images (sixel and otherwise) can get disposed when appropriate.
There will some compatibility problems. Addons that have trim handlers will have to be updated. It seems possible to kludge it so that old trim handlers are called when the index is 0.
The text was updated successfully, but these errors were encountered:
PerBothner
added a commit
to PerBothner/xterm.js
that referenced
this issue
Feb 19, 2019
I noticed that the selection is discarded when the window is resized. That is a symptom of not handling these events in a unified manner: The SelectionManager watches for trim events, but does not handle delete or insert events. That should be fixed.
I can't think of a way to actually hit this as an end user, please create another issue if you have a repro.
I believe various issues would be simplified if we unified
trim
,delete
, andinsert
events on a Buffer's lines. Most obviously, atrim
is just adelete
where the eventindex
is 0. Similarly, aninsert
can be treated as adelete
with a negativeamount
. I believe any code that needs to handle one of these events needs to handle them all - just look at at the code forBuffer.addMarker
.Also notice the ElementInsert.put method (in Buffer.ts) in my sixel pull request #1940.
Not sure whether to call the unified event 'delete' or come up with a more neutral name.
I noticed that the selection is discarded when the window is resized. That is a symptom of not handling these events in a unified manner: The
SelectionManager
watches fortrim
events, but does not handledelete
orinsert
events. That should be fixed.A related issue is that deleteLines/insertLines/eraseInDisplay should perhaps also signal a delete event. I need something similar so images (sixel and otherwise) can get disposed when appropriate.
There will some compatibility problems. Addons that have
trim
handlers will have to be updated. It seems possible to kludge it so that old trim handlers are called when the index is 0.The text was updated successfully, but these errors were encountered: