Skip to content

Commit

Permalink
use new tcell Suspend API
Browse files Browse the repository at this point in the history
  • Loading branch information
tjmtmmnk committed Feb 24, 2021
1 parent 5e97901 commit 3ab1e26
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions list.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@ func initList() {

list.SetSelectedFunc(func(index int, mainText string, secondaryText string, shortcut rune) {
item := app.state.matched[index]
f := func() {
openFile(item.FileName, item.LineNum)
if err := app.screen.Suspend(); err != nil {
logger.Error("failed to suspend: " + err.Error())
}
openFile(item.FileName, item.LineNum)
if err := app.screen.Resume(); err != nil {
logger.Error("failed to resume: " + err.Error())
}
frame.Suspend(f)
})

list.SetDoneFunc(func() {
Expand Down

0 comments on commit 3ab1e26

Please # to comment.