From c82821508e50d07fc0696af764fa8604c9f66de8 Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 16 Oct 2024 16:25:30 -0400 Subject: [PATCH] Use constants for border indices --- lua/scrollview.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lua/scrollview.lua b/lua/scrollview.lua index f17524b..4fd1a6e 100644 --- a/lua/scrollview.lua +++ b/lua/scrollview.lua @@ -2067,12 +2067,10 @@ local read_input_stream = function() if is_float then local border = config.border if border ~= nil and islist(border) and #border == 8 then - if border[2] ~= '' then - -- There is a top border. + if border[BORDER_TOP] ~= '' then mouse_row = mouse_row - 1 end - if border[8] ~= '' then - -- There is a left border. + if border[BORDER_LEFT] ~= '' then mouse_col = mouse_col - 1 end end