File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/ifs/wl_seat/text_input Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1111 wl_surface:: zwp_input_popup_surface_v2:: ZwpInputPopupSurfaceV2 ,
1212 } ,
1313 keyboard:: KeyboardState ,
14- utils:: { clonecell:: CloneCell , smallmap:: SmallMap } ,
14+ utils:: { clonecell:: CloneCell , debug_fn :: debug_fn , smallmap:: SmallMap } ,
1515 wire:: ZwpInputPopupSurfaceV2Id ,
1616 } ,
1717 kbvm:: {
@@ -154,7 +154,14 @@ impl UnicodeInput {
154154 let _ = write ! ( self . text, "U+{:x}" , self . cp) ;
155155 self . cursor = self . text . len ( ) as _ ;
156156 if let Some ( char) = char:: from_u32 ( self . cp ) {
157- let _ = write ! ( self . text, " = {}" , char ) ;
157+ let s = debug_fn ( |f| {
158+ if char == '\n' {
159+ f. write_str ( "\\ n" )
160+ } else {
161+ f. write_char ( char)
162+ }
163+ } ) ;
164+ let _ = write ! ( self . text, " = {}" , s) ;
158165 }
159166 }
160167
You can’t perform that action at this time.
0 commit comments