aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuldoman <giulio.lettieri@gmail.com>2022-12-30 18:56:58 +0100
committerGuldoman <giulio.lettieri@gmail.com>2022-12-30 18:56:58 +0100
commit1016af86fb5834152b0cf5d6cb4a5dd760cc7367 (patch)
treee087feffd4b7d200c528da7c8ddfe096b8f6b0e6
parent28e28f235798f012c4a7b8f8d2e282e96f2193cf (diff)
downloadlite-xl-plugins-1016af86fb5834152b0cf5d6cb4a5dd760cc7367.tar.gz
lite-xl-plugins-1016af86fb5834152b0cf5d6cb4a5dd760cc7367.zip
`minimap`: Fix crash if `avoid_small_docs` and `linewrapping` are both enabled
-rw-r--r--plugins/minimap.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/minimap.lua b/plugins/minimap.lua
index 603e173..75eb272 100644
--- a/plugins/minimap.lua
+++ b/plugins/minimap.lua
@@ -326,7 +326,7 @@ function MiniMap:is_minimap_enabled()
return last_line > config.plugins.minimap.avoid_small_docs
else
local docview = self.dv
- local _, y = docview:get_line_screen_position(last_line, docview.doc.lines[last_line])
+ local _, y = docview:get_line_screen_position(last_line, #docview.doc.lines[last_line])
y = y + docview.scroll.y - docview.position.y + docview:get_line_height()
return y > docview.size.y
end