Skip to content

Commit

Permalink
Another dup.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaan Christensen committed Jun 21, 2020
1 parent 5be518d commit 15ddf93
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions processor/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ package processor

import (
"fmt"
"github.com/boyter/cs/file"
str "github.com/boyter/cs/str"
"runtime"
"strconv"
"strings"
"sync"
"time"

"github.com/boyter/cs/file"
str "github.com/boyter/cs/str"

"github.com/gdamore/tcell"
"github.com/rivo/tview"
)
Expand Down Expand Up @@ -51,6 +52,10 @@ func tuiSearch(app *tview.Application, textView *tview.TextView, searchTerm sear
tuiFileWalker.Terminate()
}

if tuiFileWalker != nil {
tuiFileWalker.Terminate()
}

// TODO still a race condition here to need to resolve as we call terminate multiple times
// We lock here because we don't want another instance to run until
// this one has terminated which should happen with the terminate call
Expand Down

0 comments on commit 15ddf93

Please sign in to comment.