diff options
Diffstat (limited to 'pkg/gui/gui.go')
| -rw-r--r-- | pkg/gui/gui.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index 290cb88..1fb94ad 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -4,7 +4,6 @@ import ( "fmt" "github.com/isacikgoz/gitbatch/pkg/git" - "github.com/isacikgoz/gitbatch/pkg/queue" "github.com/jroimartin/gocui" log "github.com/sirupsen/logrus" ) @@ -23,7 +22,7 @@ type guiState struct { Repositories []*git.RepoEntity Directories []string Mode mode - Queue *queue.JobQueue + Queue *git.JobQueue } // this struct encapsulates the name and title of a view. the name of a view is @@ -78,7 +77,7 @@ func NewGui(mode string, directoies []string) (*Gui, error) { initialState := guiState{ Directories: directoies, Mode: fetchMode, - Queue: queue.CreateJobQueue(), + Queue: git.CreateJobQueue(), } gui := &Gui{ State: initialState, @@ -129,6 +128,10 @@ func (gui *Gui) Run() error { gui.g = g g.Highlight = true g.SelFgColor = gocui.ColorGreen + + // If InputEsc is true, when ESC sequence is in the buffer and it doesn't + // match any known sequence, ESC means KeyEsc. + g.InputEsc = true g.SetManagerFunc(gui.layout) if err := gui.generateKeybindings(); err != nil { |
