-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
make extended cell attributes extendable #3489
Comments
Related: #2919 |
@Tyriar Yeah the CellMarker idea is somewhat related. But I am not sure, whether to go that path at all - in the image addon I cancelled that idea and went with a viewport scan, which turned out to be fast enough for that purpose. CellMarker would certainly speedup those tasks, but would penalize the buffer logic at other ends. |
Somewhat obsolete, thus closing. |
Is there any way to do this now? I am interested in attaching custom attributes to cells (actually, whole lines of input). I see that there is a
|
@jtbandes see my response on #5214 (comment)
You can attach whatever data you want here, and modify the presentation of cells in a few ways (eg. hook into bg/fg rendering)
If you want underline/italics/etc. this would be a new feature request to add to |
Thanks for the tips and for your patience with my questions!
By "here", do you mean on the marker? I didn't see anything in the API or docs to indicate it is "safe"/expected to modify the
Could you expand on this – I don't see where cell rendering can be customized in the public API other than setting the |
In the first place markers are just stable buffer line references into the terminal buffer. Their What you can do with markers - attach custom functionality to a certain buffer line. This can be used to a great extend for your custom logic, e.g. do something, when the marked line is in the viewport. Important here - your custom logic is typically is outside of the terminal itself / fully managed by your code. |
@jtbandes using the
See Lines 596 to 615 in 41e8ae3
|
Coming from #2503. Also related #2904.
Extended attributes on cells offer a simply way of extending terminal buffer functionality for other purposes. Currently it is not possible to extend them in a flexible way to be used for custom data from addons.
TODO: Come up with an easy to interface to extend extended attributes from addons. Bonus goal - make this type safe even for runtime extensions (hard one with TS' static type system).
The text was updated successfully, but these errors were encountered: