Skip to content

Commit

Permalink
reset escape interpreter on clear, and clear with a lock
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseduffield committed Jun 5, 2019
1 parent 6258420 commit efab7b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions view.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,11 @@ func (v *View) realPosition(vx, vy int) (x, y int, err error) {

// Clear empties the view's internal buffer.
func (v *View) Clear() {
v.writeMutex.Lock()
defer v.writeMutex.Unlock()

v.tainted = true
v.ei.reset()

v.lines = nil
v.viewLines = nil
Expand Down

0 comments on commit efab7b0

Please sign in to comment.