mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-20 18:43:41 -05:00
Fix style with gofmt
This commit is contained in:
parent
f7bea21d7a
commit
8535781be1
2 changed files with 7 additions and 7 deletions
|
@ -18,10 +18,10 @@ package ui
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"maunium.net/go/gomuks/debug"
|
|
||||||
"strings"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/lucasb-eyer/go-colorful"
|
"github.com/lucasb-eyer/go-colorful"
|
||||||
|
"maunium.net/go/gomuks/debug"
|
||||||
|
"strings"
|
||||||
"unicode"
|
"unicode"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ func cmdRainbow(cmd *Command) {
|
||||||
html.WriteRune(char)
|
html.WriteRune(char)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
color := rainbow.GetInterpolatedColorFor(float64(i)/float64(len(text))).Hex()
|
color := rainbow.GetInterpolatedColorFor(float64(i) / float64(len(text))).Hex()
|
||||||
fmt.Fprintf(&html, "<font color=\"%s\">%c</font>", color, char)
|
fmt.Fprintf(&html, "<font color=\"%s\">%c</font>", color, char)
|
||||||
}
|
}
|
||||||
tempMessage := cmd.Room.NewTempMessage("m.text", html.String())
|
tempMessage := cmd.Room.NewTempMessage("m.text", html.String())
|
||||||
|
|
|
@ -193,10 +193,10 @@ func (view *MainView) KeyEventHandler(roomView *RoomView, key *tcell.EventKey) *
|
||||||
default:
|
default:
|
||||||
return key
|
return key
|
||||||
}
|
}
|
||||||
} else if k == tcell.KeyAltDown || k == tcell.KeyCtrlDown {
|
} else if k == tcell.KeyAltDown || k == tcell.KeyCtrlDown {
|
||||||
view.SwitchRoom(view.roomList.Next())
|
view.SwitchRoom(view.roomList.Next())
|
||||||
} else if k == tcell.KeyAltUp || k == tcell.KeyCtrlUp {
|
} else if k == tcell.KeyAltUp || k == tcell.KeyCtrlUp {
|
||||||
view.SwitchRoom(view.roomList.Previous())
|
view.SwitchRoom(view.roomList.Previous())
|
||||||
} else if k == tcell.KeyPgUp || k == tcell.KeyPgDn || k == tcell.KeyUp || k == tcell.KeyDown || k == tcell.KeyEnd || k == tcell.KeyHome {
|
} else if k == tcell.KeyPgUp || k == tcell.KeyPgDn || k == tcell.KeyUp || k == tcell.KeyDown || k == tcell.KeyEnd || k == tcell.KeyHome {
|
||||||
msgView := roomView.MessageView()
|
msgView := roomView.MessageView()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue