Wire up searching

This commit is contained in:
Kovid Goyal
2024-05-02 20:34:37 +05:30
parent 6e55949094
commit c2e0ecef13
3 changed files with 53 additions and 17 deletions

View File

@@ -43,8 +43,8 @@ func (self *ThemesList) Next(delta int, allow_wrapping bool) bool {
}
func limit_lengths(text string) string {
t, x := wcswidth.TruncateToVisualLengthWithWidth(text, 31)
if x >= len(text) {
t, _ := wcswidth.TruncateToVisualLengthWithWidth(text, 31)
if len(t) >= len(text) {
return text
}
return t + "…"