aboutsummaryrefslogtreecommitdiff
path: root/plugins/smoothcaret.lua
diff options
context:
space:
mode:
authorjgmdev <jgmdev@gmail.com>2022-05-22 14:37:28 -0400
committerjgmdev <jgmdev@gmail.com>2022-05-22 14:37:28 -0400
commit76bacb1fe9d0d92bb8c22a6767a98b0589d4bdd3 (patch)
tree11091b18f989d310fe43996b60e15ff482520c50 /plugins/smoothcaret.lua
parent694132ec9d81ced3d8c6ebbf10e451bbc5a9e65b (diff)
downloadlite-xl-plugins-76bacb1fe9d0d92bb8c22a6767a98b0589d4bdd3.tar.gz
lite-xl-plugins-76bacb1fe9d0d92bb8c22a6767a98b0589d4bdd3.zip
Fix various plugins for linewrapping
Diffstat (limited to 'plugins/smoothcaret.lua')
-rw-r--r--plugins/smoothcaret.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/smoothcaret.lua b/plugins/smoothcaret.lua
index 335dd08..2d0a633 100644
--- a/plugins/smoothcaret.lua
+++ b/plugins/smoothcaret.lua
@@ -22,7 +22,7 @@ function DocView:update()
local idx, v_idx = 1, 1
for _, line, col in self.doc:get_selections() do
- local x, y = self:get_line_screen_position(line)
+ local x, y = self:get_line_screen_position(line, col)
-- Keep the position relative to the whole View
-- This way scrolling won't animate the caret
x = x + self:get_col_x_offset(line, col) + self.scroll.x
@@ -57,7 +57,7 @@ function DocView:update()
-- Remove unused carets to avoid animating new ones when they are added
for i = idx, #self.carets do
- self.carets[idx] = nil
+ self.carets[i] = nil
end
if self.mouse_selecting ~= self.last_mouse_selecting then