@@ -148,7 +148,6 @@ pub struct TextFormat {
148148 pub tab_width : u16 ,
149149 pub max_wrap : u16 ,
150150 pub max_indent_retain : u16 ,
151- pub wrap_indicator : Box < str > ,
152151 pub wrap_indicator_highlight : Option < Highlight > ,
153152 pub viewport_width : u16 ,
154153 pub soft_wrap_at_text_width : bool ,
@@ -162,7 +161,6 @@ impl Default for TextFormat {
162161 tab_width : 4 ,
163162 max_wrap : 3 ,
164163 max_indent_retain : 4 ,
165- wrap_indicator : Box :: from ( " " ) ,
166164 viewport_width : 17 ,
167165 wrap_indicator_highlight : None ,
168166 soft_wrap_at_text_width : false ,
@@ -311,25 +309,8 @@ impl<'t> DocumentFormatter<'t> {
311309 . virtual_lines_at ( self . char_pos , self . visual_pos , self . line_pos ) ;
312310 self . visual_pos . col = indent_carry_over as usize ;
313311 self . visual_pos . row += 1 + virtual_lines;
314- let mut i = 0 ;
315312 let mut word_width = 0 ;
316- let wrap_indicator = UnicodeSegmentation :: graphemes ( & * self . text_fmt . wrap_indicator , true )
317- . map ( |g| {
318- i += 1 ;
319- let grapheme = GraphemeWithSource :: new (
320- g. into ( ) ,
321- self . visual_pos . col + word_width,
322- self . text_fmt . tab_width ,
323- GraphemeSource :: VirtualText {
324- highlight : self . text_fmt . wrap_indicator_highlight ,
325- } ,
326- ) ;
327- word_width += grapheme. width ( ) ;
328- grapheme
329- } ) ;
330- self . word_buf . splice ( 0 ..0 , wrap_indicator) ;
331-
332- for grapheme in & mut self . word_buf [ i..] {
313+ for grapheme in & mut self . word_buf {
333314 let visual_x = self . visual_pos . col + word_width;
334315 grapheme
335316 . grapheme
0 commit comments