From af539910987c560509f2f0d9c14fe1a152e8f131 Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 9 Sep 2024 21:00:14 +0300 Subject: [PATCH] red: fix in curvisible --- data/lib/red/win.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/lib/red/win.lua b/data/lib/red/win.lua index 742366f..4027b56 100644 --- a/data/lib/red/win.lua +++ b/data/lib/red/win.lua @@ -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))