mirror of
https://github.com/junegunn/fzf.git
synced 2026-10-26 20:16:32 +00:00
Fix ANSI offset calculation
This commit is contained in:
1 parent
4e0e492427
commit
165acbd1be
1 file changed
+1
-1
+1
-1
@@ -50,7 +50,7 @@ func extractColor(str *string) (*string, []ansiOffset) {
|
||||
if !newState.equals(state) {
|
||||
if state != nil {
|
||||
// Update last offset
|
||||
(&offsets[len(offsets)-1]).offset[1] = int32(output.Len())
|
||||
(&offsets[len(offsets)-1]).offset[1] = int32(utf8.RuneCount(output.Bytes()))
|
||||
}
|
||||
|
||||
if newState.colored() {
|
||||
|
||||
Reference in new issue
Block a user