Skip to content

Commit

Permalink
fix: remove draw previous smear to avoid jumps to cmd line
Browse files Browse the repository at this point in the history
  • Loading branch information
sphamba committed Dec 28, 2024
1 parent e40f8bc commit ce8e739
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions lua/smear_cursor/animation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ local target_position = { 0, 0 }
local current_corners = {}
local target_corners = {}
local stiffnesses = { 0, 0, 0, 0 }
local previous_ending_drawn = false -- only draw previous smear once

local previous_window_id = -1
local current_window_id = -1
Expand Down Expand Up @@ -295,18 +294,6 @@ M.change_target_position = function(row, col)
if target_position[1] == row and target_position[2] == col then return end
draw.clear()

-- Draw end of previous smear
if animating then
if not previous_ending_drawn then
set_stiffnesses(1, 0)
update()
draw.draw_quad(shrink_volume(current_corners), target_position)
vim.cmd.redraw()
previous_ending_drawn = true
end
set_corners(current_corners, target_position[1], target_position[2])
end

target_position = { row, col }
set_corners(target_corners, row, col)
set_stiffnesses(config.stiffness, config.trailing_stiffness)
Expand Down

0 comments on commit ce8e739

Please sign in to comment.