Compare commits

..

4 Commits

Author SHA1 Message Date
Jesse Duffield
cc13ae252a totally screwed up the last commit 2020-04-22 11:21:20 +10:00
Jesse Duffield
b97f844a3e handle comments in todo files 2020-04-22 11:15:41 +10:00
Glenn Vriesman
1d6eb015c1 fix: fixed yaml typo
Signed-off-by: Glenn Vriesman <glenn.vriesman@gmail.com>
2020-04-22 08:52:08 +10:00
Jesse Duffield
07a8ae8c3e add handler for searching in menu 2020-04-21 19:28:31 +10:00
3 changed files with 10 additions and 2 deletions

View File

@@ -215,6 +215,9 @@ func (c *CommitListBuilder) getInteractiveRebasingCommits() ([]*Commit, error) {
if line == "" || line == "noop" {
return commits, nil
}
if strings.HasPrefix(line, "#") {
continue
}
splitLine := strings.Split(line, " ")
commits = append([]*Commit{{
Sha: splitLine[1],
@@ -224,7 +227,7 @@ func (c *CommitListBuilder) getInteractiveRebasingCommits() ([]*Commit, error) {
}}, commits...)
}
return nil, nil
return commits, nil
}
// assuming the file starts like this:

View File

@@ -6,5 +6,5 @@ func GetPlatformDefaultConfig() []byte {
`os:
openCommand: 'cmd /c "start "" {{filename}}"'
openLinkCommand: 'cmd /c "start "" {{link}}"'
copyToClipboardCommand: 'cmd \c "echo -n {{str}} > /dev/clipboard"`)
copyToClipboardCommand: 'cmd \c "echo -n {{str}} > /dev/clipboard"'`)
}

View File

@@ -79,6 +79,11 @@ func (gui *Gui) createMenu(title string, items []*menuItem, createMenuOptions cr
menuView.FgColor = theme.GocuiDefaultTextColor
menuView.ContainsList = true
menuView.Clear()
menuView.SetOnSelectItem(gui.onSelectItemWrapper(func(selectedLine int) error {
gui.State.Panels.Menu.SelectedLine = selectedLine
menuView.FocusPoint(0, selectedLine)
return nil
}))
fmt.Fprint(menuView, list)
gui.State.Panels.Menu.SelectedLine = 0