1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

auto-updates

This commit is contained in:
Jesse Duffield
2018-08-25 15:55:49 +10:00
parent f24c95aede
commit 21f6e9ba87
14 changed files with 359 additions and 166 deletions

View File

@ -4,7 +4,6 @@ import (
"fmt"
"sort"
"strings"
"time"
"github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/utils"
@ -222,9 +221,6 @@ func (gui *Gui) renderString(g *gocui.Gui, viewName, s string) error {
if err != nil {
return nil
}
if viewName == "appStatus" {
gui.Log.Info(s)
}
v.Clear()
output := string(bom.Clean([]byte(s)))
output = utils.NormalizeLinefeeds(output)
@ -248,14 +244,6 @@ func (gui *Gui) renderOptionsMap(g *gocui.Gui, optionsMap map[string]string) err
return gui.renderString(g, "options", gui.optionsMapToString(optionsMap))
}
func (gui *Gui) loader() string {
characters := "|/-\\"
now := time.Now()
nanos := now.UnixNano()
index := nanos / 50000000 % int64(len(characters))
return characters[index : index+1]
}
// TODO: refactor properly
func (gui *Gui) getFilesView(g *gocui.Gui) *gocui.View {
v, _ := g.View("files")