improve a comment

This commit is contained in:
Kartik K. Agaram 2023-07-31 08:21:38 -07:00
parent 52ba030eaa
commit 484b76f5c6
2 changed files with 2 additions and 2 deletions

View File

@ -51,8 +51,8 @@ function Text.draw(State, line_index, y, startpos, hide_cursor)
App.screen.print(frag, x,y)
x = x+App.width(frag)
end
-- render cursor if necessary
if not hide_cursor and line_index == State.cursor1.line then
-- render search highlight or cursor
if pos <= State.cursor1.pos and pos + frag_len >= State.cursor1.pos then
if State.search_term then
local data = State.lines[State.cursor1.line].data

View File

@ -29,8 +29,8 @@ function Text.draw(State, line_index, y, startpos)
end
App.color(Text_color)
App.screen.print(screen_line, State.left,y)
-- render cursor if necessary
if line_index == State.cursor1.line then
-- render search highlight or cursor
if pos <= State.cursor1.pos and pos + frag_len >= State.cursor1.pos then
if State.search_term then
local data = State.lines[State.cursor1.line].data