Skip to content

Commit 14f096b

Browse files
committed
fix: allow particles to be drawn above existing particles
1 parent 747807d commit 14f096b

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

lua/smear_cursor/draw.lua

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,15 @@ M.draw_particles = function(particles, target_position)
946946
for row, row_cells in pairs(cells) do
947947
for col, cell in pairs(row_cells) do
948948
if row == target_position[1] and col == target_position[2] then goto continue end
949-
if not config.particles_over_text and vim.fn.screenstring(row, col) ~= " " then goto continue end
949+
local bg_char_code = vim.fn.screenchar(row, col)
950+
if
951+
not config.particles_over_text
952+
and bg_char_code ~= 32
953+
and not (bg_char_code >= 0x2800 and bg_char_code <= 0x28FF)
954+
and not (bg_char_code >= 0x1CD00 and bg_char_code <= 0x1CDE7)
955+
then
956+
goto continue
957+
end
950958

951959
local num_dots = (cell[1][1] > 0 and 1 or 0)
952960
+ (cell[2][1] > 0 and 1 or 0)

0 commit comments

Comments
 (0)