mirror of
https://github.com/diamondburned/cchat-gtk.git
synced 2025-03-22 01:49:26 +00:00
monospace font; fixed completion bug
This commit is contained in:
parent
479e99f5bb
commit
f8cc290461
|
@ -63,6 +63,7 @@ func NewView(ctrl Controller) *InputView {
|
|||
text.SetProperty("bottom-margin", 4)
|
||||
text.SetProperty("left-margin", 8)
|
||||
text.SetProperty("right-margin", 8)
|
||||
text.SetProperty("monospace", true)
|
||||
text.Show()
|
||||
|
||||
primitives.AddClass(text, "message-input")
|
||||
|
|
|
@ -75,7 +75,6 @@ func NewCompleter(input *gtk.TextView) *Completer {
|
|||
l.Connect("row-activated", func(l *gtk.ListBox, r *gtk.ListBoxRow) {
|
||||
SwapWord(ibuf, c.entries[r.GetIndex()].Raw, c.cursor)
|
||||
c.onChange() // signal change
|
||||
c.Clear()
|
||||
c.Popdown()
|
||||
input.GrabFocus()
|
||||
})
|
||||
|
@ -86,7 +85,6 @@ func NewCompleter(input *gtk.TextView) *Completer {
|
|||
// SetCompleter sets the current completer. If completer is nil, then the
|
||||
// completer is disabled.
|
||||
func (c *Completer) SetCompleter(completer cchat.Completer) {
|
||||
c.Clear()
|
||||
c.Popdown()
|
||||
c.completer = completer
|
||||
}
|
||||
|
@ -106,6 +104,7 @@ func (c *Completer) Popdown() {
|
|||
if !c.popdown {
|
||||
c.Popover.Popdown()
|
||||
c.popdown = true
|
||||
c.Clear()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -146,6 +145,7 @@ func (c *Completer) onChange() {
|
|||
if blank {
|
||||
c.words = nil
|
||||
c.index = -1
|
||||
c.Popdown()
|
||||
log.Println("RESET INDEX TO -1")
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue