Fixed Mouse binding issue after external Editor by https://github.com/rivo/tview/issues/545

This commit is contained in:
Anis Ahmad
2021-01-15 11:35:06 +06:00
parent 1b6ae23158
commit 0c09a29550
9 changed files with 154 additions and 44 deletions

View File

@@ -5,7 +5,7 @@ import (
"os"
"github.com/asdine/storm/v3"
"github.com/gdamore/tcell"
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"
"github.com/ajaxray/geek-life/model"

View File

@@ -1,7 +1,7 @@
package main
import (
"github.com/gdamore/tcell"
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"
"github.com/ajaxray/geek-life/model"

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"strings"
"github.com/gdamore/tcell"
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"
"github.com/ajaxray/geek-life/model"

View File

@@ -7,7 +7,7 @@ import (
"os/exec"
"time"
"github.com/gdamore/tcell"
"github.com/gdamore/tcell/v2"
"github.com/pgavlin/femto"
"github.com/pgavlin/femto/runtime"
"github.com/rivo/tview"
@@ -239,14 +239,14 @@ func (td *TaskDetailPane) editInExternalEditor() {
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
if err := cmd.Run(); err != nil {
messageToShow = "[red::]Failed to save content. Try in-app editing by pressing i"
messageToShow = "[red::]Failed to save content. Try in-app editing by pressing e"
return
}
if content, readErr := ioutil.ReadFile(tmpFileName); readErr == nil {
updatedContent = string(content)
} else {
messageToShow = "[red::]Failed to load external editing. Try in-app editing by pressing i"
messageToShow = "[red::]Failed to load external editing. Try in-app editing by pressing e"
}
})

View File

@@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/gdamore/tcell"
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"
"github.com/ajaxray/geek-life/model"

View File

@@ -6,7 +6,7 @@ import (
"time"
"github.com/asdine/storm/v3"
"github.com/gdamore/tcell"
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"
"github.com/ajaxray/geek-life/model"

View File

@@ -5,7 +5,7 @@ import (
"reflect"
"time"
"github.com/gdamore/tcell"
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"
"github.com/ajaxray/geek-life/model"