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 @@ -343,14 +343,14 @@ impl Buffer {
343
343
let mut start_index = self . index_of ( x, y) ;
344
344
let mut index = self . index_of ( max_offset as u16 , y) ;
345
345
346
- let total_width = string. width ( ) ;
347
- let truncated = total_width > width;
346
+ let content_width = string. width ( ) ;
347
+ let truncated = content_width > width;
348
348
if ellipsis && truncated {
349
349
self . content [ start_index] . set_symbol ( "…" ) ;
350
350
start_index += 1 ;
351
351
}
352
352
if !truncated {
353
- index -= width - total_width ;
353
+ index -= width - content_width ;
354
354
}
355
355
for ( byte_offset, s) in graphemes. rev ( ) {
356
356
let width = s. width ( ) ;
@@ -367,6 +367,7 @@ impl Buffer {
367
367
self . content [ i] . reset ( ) ;
368
368
}
369
369
index -= width;
370
+ x_offset += width;
370
371
}
371
372
}
372
373
( x_offset as u16 , y)
You can’t perform that action at this time.
0 commit comments