mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 10:41:58 +02:00
Modernize Go code
This commit is contained in:
@@ -292,13 +292,13 @@ func (h *Handler) draw_num_of_matches(num_shown, y int, in_progress bool) {
|
||||
st := loop.SizedText{Subscale_denominator: 2, Subscale_numerator: 1, Vertical_alignment: 2, Width: 1}
|
||||
graphemes := wcswidth.SplitIntoGraphemes(m)
|
||||
for len(graphemes) > 0 {
|
||||
s := ""
|
||||
var s strings.Builder
|
||||
for w := 0; w < 2 && len(graphemes) > 0; {
|
||||
w += wcswidth.Stringwidth(graphemes[0])
|
||||
s += graphemes[0]
|
||||
s.WriteString(graphemes[0])
|
||||
graphemes = graphemes[1:]
|
||||
}
|
||||
h.lp.DrawSizedText(s, st)
|
||||
h.lp.DrawSizedText(s.String(), st)
|
||||
}
|
||||
if spinner != "" {
|
||||
h.lp.QueueWriteString(spinner)
|
||||
|
||||
Reference in New Issue
Block a user