File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,8 @@ func (self *OptionsMapMgr) formatBindingInfos(bindingInfos []bindingInfo) string
119
119
plainText := fmt .Sprintf ("%s: %s" , info .description , info .key )
120
120
121
121
// Check if adding the next formatted string exceeds the available width
122
- if i > 0 && length + len (separator )+ len (plainText ) > width {
122
+ textLen := utils .StringWidth (plainText )
123
+ if i > 0 && length + len (separator )+ textLen > width {
123
124
builder .WriteString (theme .OptionsFgColor .Sprint (separator + ellipsis ))
124
125
break
125
126
}
@@ -131,7 +132,7 @@ func (self *OptionsMapMgr) formatBindingInfos(bindingInfos []bindingInfo) string
131
132
length += len (separator )
132
133
}
133
134
builder .WriteString (formatted )
134
- length += len ( plainText )
135
+ length += textLen
135
136
}
136
137
137
138
return builder .String ()
You can’t perform that action at this time.
0 commit comments