diff options
author | Mark Kopenga <mkopenga@gmail.com> | 2018-12-06 08:31:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-06 08:31:12 +0100 |
commit | 1b6d34e76a4d5d132f95072139fb3aba760eb771 (patch) | |
tree | fb6cc607a67f0d3d2ef0b9d66fafd439864e6d9a /pkg/gui/view_helpers.go | |
parent | 67115436347dec591d12a1a31d1c971915cf0b05 (diff) | |
parent | 1a6a69a8f1f7c44978a384ba56321149f973223d (diff) |
Merge branch 'master' into https-ask-for-username-password
Diffstat (limited to 'pkg/gui/view_helpers.go')
-rw-r--r-- | pkg/gui/view_helpers.go | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/pkg/gui/view_helpers.go b/pkg/gui/view_helpers.go index 8eca29b44..9c5d1684b 100644 --- a/pkg/gui/view_helpers.go +++ b/pkg/gui/view_helpers.go @@ -105,6 +105,9 @@ func (gui *Gui) newLineFocused(g *gocui.Gui, v *gocui.View) error { return gui.handleCommitSelect(g, v) case "stash": return gui.handleStashEntrySelect(g, v) + case "staging": + return nil + // return gui.handleStagingSelect(g, v) default: panic(gui.Tr.SLocalize("NoViewMachingNewLineFocusedSwitchStatement")) } @@ -155,6 +158,10 @@ func (gui *Gui) switchFocus(g *gocui.Gui, oldView, newView *gocui.View) error { if _, err := g.SetCurrentView(newView.Name()); err != nil { return err } + if _, err := g.SetViewOnTop(newView.Name()); err != nil { + return err + } + g.Cursor = newView.Editable return gui.newLineFocused(g, newView) @@ -254,7 +261,6 @@ func (gui *Gui) renderString(g *gocui.Gui, viewName, s string) error { output := string(bom.Clean([]byte(s))) output = utils.NormalizeLinefeeds(output) fmt.Fprint(v, output) - v.Wrap = true return nil }) return nil @@ -295,6 +301,11 @@ func (gui *Gui) getBranchesView(g *gocui.Gui) *gocui.View { return v } +func (gui *Gui) getStagingView(g *gocui.Gui) *gocui.View { + v, _ := g.View("staging") + return v +} + func (gui *Gui) trimmedContent(v *gocui.View) string { return strings.TrimSpace(v.Buffer()) } |