File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -360,14 +360,14 @@ impl Buffer {
360
360
let mut start_index = self . index_of ( x, y) ;
361
361
let mut index = self . index_of ( max_offset as u16 , y) ;
362
362
363
- let total_width = string. width ( ) ;
364
- let truncated = total_width > width;
363
+ let content_width = string. width ( ) ;
364
+ let truncated = content_width > width;
365
365
if ellipsis && truncated {
366
366
self . content [ start_index] . set_symbol ( "…" ) ;
367
367
start_index += 1 ;
368
368
}
369
369
if !truncated {
370
- index -= width - total_width ;
370
+ index -= width - content_width ;
371
371
}
372
372
for ( byte_offset, s) in graphemes. rev ( ) {
373
373
let width = s. width ( ) ;
@@ -384,6 +384,7 @@ impl Buffer {
384
384
self . content [ i] . reset ( ) ;
385
385
}
386
386
index -= width;
387
+ x_offset += width;
387
388
}
388
389
}
389
390
( x_offset as u16 , y)
You can’t perform that action at this time.
0 commit comments