Skip to content

Commit

Permalink
fix: clearing single lines
Browse files Browse the repository at this point in the history
  • Loading branch information
cfoust committed Nov 18, 2023
1 parent 6862ace commit 96afdf6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/emu/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ func (t *State) clear(x0, y0, x1, y1 int) {
C: x0,
},
Size: geom.Vec2{
R: y1 - y0,
C: x1 - x0,
R: y1 - y0 + 1,
C: x1 - x0 + 1,
},
}
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/sessions/search/search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ func TestClearLine(t *testing.T) {
"baz",
).
Term(terminfo.CursorAddress, 0, 0).
Term(terminfo.DeleteLine)
Term(terminfo.ClrEol).
Add("baz")

results, err := Search(sim.Events(), "foo", nil)
require.NoError(t, err)
Expand Down

0 comments on commit 96afdf6

Please sign in to comment.