@@ -891,7 +891,8 @@ local function draw_braille_character(row, col, cell, hl_group, zindex)
891891 M .draw_character (row , col , braille_characters [braille_index ], hl_group , zindex )
892892end
893893
894- M .draw_particles = function (particles )
894+ M .draw_particles = function (particles , target_position )
895+ if target_position == nil then target_position = { 0 , 0 } end
895896 local cells = {}
896897
897898 for _ , particle in ipairs (particles ) do
@@ -908,6 +909,8 @@ M.draw_particles = function(particles)
908909
909910 for row , row_cells in pairs (cells ) do
910911 for col , cell in pairs (row_cells ) do
912+ if row == target_position [1 ] and col == target_position [2 ] then goto continue end
913+
911914 local num_dots = (cell [1 ][1 ] > 0 and 1 or 0 )
912915 + (cell [2 ][1 ] > 0 and 1 or 0 )
913916 + (cell [3 ][1 ] > 0 and 1 or 0 )
@@ -927,15 +930,17 @@ M.draw_particles = function(particles)
927930 local shade = math.min (1 , lifetime_sum / num_dots / config .particle_max_lifetime )
928931 local hl_group_index = round (shade * config .color_levels )
929932
930- if hl_group_index > 0 then
931- draw_braille_character (
932- row ,
933- col ,
934- cell ,
935- color .get_hl_group ({ level = hl_group_index }),
936- config .windows_zindex - 1
937- )
938- end
933+ if hl_group_index == 0 then goto continue end
934+
935+ draw_braille_character (
936+ row ,
937+ col ,
938+ cell ,
939+ color .get_hl_group ({ level = hl_group_index }),
940+ config .windows_zindex - 1
941+ )
942+
943+ :: continue::
939944 end
940945 end
941946end
0 commit comments