Skip to content

Commit

Permalink
red: fix in curvisible
Browse files Browse the repository at this point in the history
  • Loading branch information
hugeping committed Sep 9, 2024
1 parent 5da9134 commit af53991
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/lib/red/win.lua
Original file line number Diff line number Diff line change
Expand Up @@ -868,8 +868,8 @@ function win:file(fname)
end

function win:curvisible()
local sel = self.buf:getsel()
if sel and sel.s then
local sel = self.buf:issel() and self.buf:getsel()
if sel then
return self.epos and ((sel.s >= self.pos and
sel.s <= self.epos) or
(sel.e-1 >= self.pos and sel.e-1 <= self.epos))
Expand Down

0 comments on commit af53991

Please sign in to comment.