On 3/12/24 06:28, 'Albrecht Schlosser' via fltk.coredev wrote:
should the methods Fl_Terminal::selection_text_len() and Fl_Terminal::selection_text() be public rather than protected?
Currently they are protected. Was this intentional?
Anyway, I'll change it to be public, as these methods work with simple
text,
devoid of color/attribute information. Commit forthcoming.
Thanks.
On 3/12/24 13:18, 'Albrecht Schlosser' via fltk.coredev wrote:
... and while you're at it ...
I noticed two minor (?) issues with mouse selection:
(1) I can't select the full text of one line up to and including the newline. Whenever I drag the mouse to the beginning of a line the first character of that line gets included in the selection. This is different than e.g. the behavior in Fl_Text_Display/_Editor.
(2) The text(false) method outputs one additional line at the end. Since I fixed buffer trimming (commit aa02a0297be) this is "only" an additional LF character but it's still not correct. I looked into it but maybe you can find the culprit and fix it easier than me.
Thanks for this great widget, BTW. As you can see I'm now using it also in test/handle_keys.cxx for interactive output. I was looking for a better widget but its printf() and similar methods to output text made it unique.