File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change 11# ABSTRACT: A text widget that has clickable lines / a selected line.
22
3- use Text::MiscUtils::Layout;
4-
53use Terminal::Widgets::Events;
6- use Terminal::Widgets::SpanStyle;
7- use Terminal::Widgets::SpanBuffer;
84use Terminal::Widgets::Focusable;
95use Terminal::Widgets::SpanWrappingAndHighlighting;
106
@@ -19,8 +15,7 @@ class Terminal::Widgets::RichText
1915 $ ! wrap = $ wrap if $ wrap ;
2016 }
2117
22- # | Replace the contents of this RichText widget.
23- method set-text (SpanContent $ content ) {
18+ method set-text ($ content ) {
2419 self ! set-text: $ content ;
2520 }
2621
Original file line number Diff line number Diff line change 11# ABSTRACT: A text widget that has clickable lines / a selected line.
22
3- use Text::MiscUtils::Layout;
4-
53use Terminal::Widgets::Events;
6- use Terminal::Widgets::SpanStyle;
7- use Terminal::Widgets::SpanBuffer;
84use Terminal::Widgets::Focusable;
95use Terminal::Widgets::SpanWrappingAndHighlighting;
106
@@ -386,7 +382,8 @@ class Terminal::Widgets::TreeView
386382 self . x-scroll + $ x , $ rel-y );
387383 $ ! cursor-x = $ x min self ! chars-in-line(@ ! lines [$ line-index ]) - 1 ;
388384
389- my $ prefix-len = duospace-width(self ! dn-get-prefix($ dn ));
385+ my $ locale = $ . terminal . locale;
386+ my $ prefix-len = $ locale . width(self ! dn-get-prefix($ dn ));
390387 if $ ! cursor-x < $ prefix-len {
391388 self ! toggle-expand-dn($ dn );
392389 }
You can’t perform that action at this time.
0 commit comments