File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ impl TextInputComponent {
170170 txt = text_append (
171171 txt,
172172 Text :: styled (
173- substitute. clone ( ) ,
173+ substitute. to_owned ( ) ,
174174 self . theme
175175 . text ( false , false )
176176 . add_modifier ( Modifier :: UNDERLINED ) ,
@@ -413,8 +413,8 @@ mod tests {
413413 "" ,
414414 ) ;
415415 let theme = SharedTheme :: default ( ) ;
416- let underlined = theme
417- . text ( true , false )
416+ let underlined_whitespace = theme
417+ . text ( false , false )
418418 . add_modifier ( Modifier :: UNDERLINED ) ;
419419
420420 let not_underlined = Style :: default ( ) ;
@@ -430,8 +430,11 @@ mod tests {
430430 get_style( & txt. lines[ 0 ] . 0 [ 0 ] ) ,
431431 Some ( & not_underlined)
432432 ) ;
433- assert_eq ! ( get_text( & txt. lines[ 0 ] . 0 [ 1 ] ) , Some ( " " ) ) ;
434- assert_eq ! ( get_style( & txt. lines[ 0 ] . 0 [ 1 ] ) , Some ( & underlined) ) ;
433+ assert_eq ! ( get_text( & txt. lines[ 0 ] . 0 [ 1 ] ) , Some ( "\u{00B7} " ) ) ;
434+ assert_eq ! (
435+ get_style( & txt. lines[ 0 ] . 0 [ 1 ] ) ,
436+ Some ( & underlined_whitespace)
437+ ) ;
435438 }
436439
437440 #[ test]
You can’t perform that action at this time.
0 commit comments