Skip to content

Commit

Permalink
Sleep to avoid freeze
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusLindroth committed Jun 14, 2020
1 parent a999572 commit 5ed6457
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"path/filepath"
"regexp"
"strings"
"time"

"github.com/gdamore/tcell"
"github.com/mattn/go-mastodon"
Expand Down Expand Up @@ -94,6 +95,8 @@ func openEditor(app *tview.Application, content string) (string, error) {
f.Seek(0, 0)
text, err = ioutil.ReadAll(f)
})
f.Close()
time.Sleep(100 * time.Millisecond)
if err != nil {
return "", err
}
Expand Down

0 comments on commit 5ed6457

Please sign in to comment.