Skip to content

Commit 49cff50

Browse files
committed
Remove T::MU::L from a few places
... in favor of locale.width where possible
1 parent 2f12675 commit 49cff50

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

lib/Terminal/Widgets/I18N/Locale.rakumod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# ABSTRACT: Per-terminal user locale information
22

3-
use Text::MiscUtils::Layout;
43
use Terminal::Widgets::I18N::Translation;
54

65
constant ContentRenderer =

lib/Terminal/Widgets/Input/Text.rakumod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
use Terminal::LineEditor::DuospaceInput;
44
use Terminal::LineEditor::RawTerminalInput;
5-
use Text::MiscUtils::Layout;
65

76
use Terminal::Widgets::Utils::Color;
87
use Terminal::Widgets::Events;

lib/Terminal/Widgets/SpanWrappingAndHighlighting.rakumod

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# ABSTRACT: A role that does span wrapping.
22

3-
use Text::MiscUtils::Layout;
4-
53
use Terminal::Widgets::SpanStyle;
64
use Terminal::Widgets::SpanBuffer;
75
use Terminal::Widgets::Focusable;
@@ -320,8 +318,9 @@ does Terminal::Widgets::SpanBuffer {
320318
}
321319

322320
method !chars-fitting-in-width($text, $width --> Int) {
321+
my $locale = $.terminal.locale;
323322
my $count = $width;
324-
while duospace-width($text.substr(0, $count)) > $width {
323+
while $locale.width($text.substr(0, $count)) > $width {
325324
$count--;
326325
}
327326
$count

0 commit comments

Comments
 (0)