File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
lua/tiny-glimmer/overwrite Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
local M = {}
2
2
local utils = require (" tiny-glimmer.utils" )
3
+ local AnimationFactory = require (" tiny-glimmer.animation.factory" )
3
4
4
5
local function split_lines (text )
5
6
local lines = {}
@@ -17,17 +18,17 @@ local function animate_paste(opts, mode)
17
18
local register = vim .v .register or ' "'
18
19
local text = split_lines (vim .fn .getreg (register , true ))
19
20
20
- vim .schedule (function ()
21
+ vim .defer_fn (function ()
21
22
local range = utils .get_range_yank ()
22
23
23
- require ( " tiny-glimmer.animation.factory " ) .get_instance ():create_text_animation (opts .default_animation , {
24
+ AnimationFactory .get_instance ():create_text_animation (opts .default_animation , {
24
25
base = {
25
26
range = range ,
26
27
},
27
28
is_paste = true ,
28
29
content = text ,
29
30
})
30
- end )
31
+ end , 10 )
31
32
end
32
33
33
34
function M .paste (opts )
You can’t perform that action at this time.
0 commit comments