build: upgrade tview to latest
This commit is contained in:
parent
0a0ba1c9a3
commit
0f6e2ee953
3 changed files with 15 additions and 7 deletions
|
|
@ -229,15 +229,17 @@ func (mi *messageInput) tabComplete(isAuto bool) {
|
|||
if !isAuto {
|
||||
if mi.cfg.AutocompleteLimit == 0 {
|
||||
mi.searchMember(gID, name)
|
||||
mems, err := discordState.Cabinet.Members(gID)
|
||||
|
||||
members, err := discordState.Cabinet.Members(gID)
|
||||
if err != nil {
|
||||
slog.Error("fetching members failed", "err", err)
|
||||
slog.Error("failed to get members from state", "guild_id", gID, "err", err)
|
||||
return
|
||||
}
|
||||
res := fuzzy.FindFrom(name, memberList(mems))
|
||||
|
||||
res := fuzzy.FindFrom(name, memberList(members))
|
||||
for _, r := range res {
|
||||
if channelHasUser(cID, mems[r.Index].User.ID) {
|
||||
mi.Replace(pos, posEnd, "@"+mems[r.Index].User.Username+" ")
|
||||
if channelHasUser(cID, members[r.Index].User.ID) {
|
||||
mi.Replace(pos, posEnd, "@"+members[r.Index].User.Username+" ")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
@ -364,9 +366,11 @@ func (mi *messageInput) showMentionList(col int) {
|
|||
t, _ := mi.mentionsList.GetItemText(i)
|
||||
w = max(w, tview.TaggedStringWidth(t))
|
||||
}
|
||||
|
||||
w = min(w+borders*2, maxW)
|
||||
x += min(col, maxW-w)
|
||||
}
|
||||
|
||||
l.SetRect(x, y, w, h)
|
||||
|
||||
app.pages.
|
||||
|
|
|
|||
4
go.mod
4
go.mod
|
|
@ -5,7 +5,7 @@ go 1.24.4
|
|||
require (
|
||||
github.com/BurntSushi/toml v1.5.0
|
||||
github.com/atotto/clipboard v0.1.4
|
||||
github.com/ayn2op/tview v0.0.0-20250716183101-b72c589da3fc
|
||||
github.com/ayn2op/tview v0.0.0-20250720032506-63f04e47b15d
|
||||
github.com/deckarep/gosx-notifier v0.0.0-20180201035817-e127226297fb
|
||||
github.com/diamondburned/arikawa/v3 v3.5.1-0.20250703053218-19d9c3f2e011
|
||||
github.com/diamondburned/ningen/v3 v3.0.1-0.20250703054403-e5dc4cf15e84
|
||||
|
|
@ -42,7 +42,7 @@ require (
|
|||
github.com/rivo/uniseg v0.4.7 // indirect
|
||||
github.com/sergeymakinen/go-bmp v1.0.0 // indirect
|
||||
github.com/sergeymakinen/go-ico v1.0.0-beta.0 // indirect
|
||||
github.com/spf13/pflag v1.0.6 // indirect
|
||||
github.com/spf13/pflag v1.0.7 // indirect
|
||||
github.com/tadvi/systray v0.0.0-20190226123456-11a2b8fa57af // indirect
|
||||
github.com/twmb/murmur3 v1.1.8 // indirect
|
||||
go4.org v0.0.0-20230225012048-214862532bf5 // indirect
|
||||
|
|
|
|||
4
go.sum
4
go.sum
|
|
@ -29,6 +29,8 @@ github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z
|
|||
github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=
|
||||
github.com/ayn2op/tview v0.0.0-20250716183101-b72c589da3fc h1:tvZTUZ13fHBOBehe10aTZYsyqzgbIsMjLP7Oilwr9mQ=
|
||||
github.com/ayn2op/tview v0.0.0-20250716183101-b72c589da3fc/go.mod h1:xqhotzuhTSxSudyNSHJfpD6S5C7+FFVv+JzJ8YaFNK4=
|
||||
github.com/ayn2op/tview v0.0.0-20250720032506-63f04e47b15d h1:+Q2vA4jMu5/tU8uAyr7mqX63br1jWFEa8q/fZNPP96Y=
|
||||
github.com/ayn2op/tview v0.0.0-20250720032506-63f04e47b15d/go.mod h1:xqhotzuhTSxSudyNSHJfpD6S5C7+FFVv+JzJ8YaFNK4=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
|
|
@ -147,6 +149,8 @@ github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo=
|
|||
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0=
|
||||
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
|
||||
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/spf13/pflag v1.0.7 h1:vN6T9TfwStFPFM5XzjsvmzZkLuaLX+HS+0SeFLRgU6M=
|
||||
github.com/spf13/pflag v1.0.7/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue