@@ -3,8 +3,8 @@ local str = require("gitlinker.commons.str")
3
3
local num = require (" gitlinker.commons.num" )
4
4
local LogLevels = require (" gitlinker.commons.logging" ).LogLevels
5
5
local logging = require (" gitlinker.commons.logging" )
6
+ local async = require (" gitlinker.commons.async" )
6
7
7
- local async = require (" gitlinker.async" )
8
8
local configs = require (" gitlinker.configs" )
9
9
local range = require (" gitlinker.range" )
10
10
local linker = require (" gitlinker.linker" )
@@ -221,7 +221,7 @@ local _link = function(opts)
221
221
lk .rev = opts .rev
222
222
end
223
223
224
- async .scheduler ()
224
+ async .schedule ()
225
225
local ok , url = pcall (opts .router , lk , true )
226
226
-- logger:debug(
227
227
-- "|link| ok:%s, url:%s, router:%s",
@@ -273,7 +273,7 @@ local _link = function(opts)
273
273
end
274
274
275
275
--- @type fun ( opts :{ action : gitlinker.Action ?, router : gitlinker.Router,lstart : integer,lend : integer,remote : string ?, file : string ?, rev : string ?}): string ?
276
- local _void_link = async .void ( _link )
276
+ local _sync_link = async .sync ( 1 , _link )
277
277
278
278
--- @param args string ?
279
279
--- @return { router_type : string,remote : string ?, file : string ?, rev : string ?}
@@ -332,7 +332,7 @@ local function setup(opts)
332
332
local lstart = math.min (r .lstart , r .lend , command_opts .line1 , command_opts .line2 )
333
333
local lend = math.max (r .lstart , r .lend , command_opts .line1 , command_opts .line2 )
334
334
local parsed = _parse_args (args )
335
- _void_link ({
335
+ _sync_link ({
336
336
action = command_opts .bang and require (" gitlinker.actions" ).system
337
337
or require (" gitlinker.actions" ).clipboard ,
338
338
router = function (lk )
@@ -392,7 +392,7 @@ local function link_api(opts)
392
392
opts .lend = math.max (r .lstart , r .lend )
393
393
end
394
394
395
- _void_link ({
395
+ _sync_link ({
396
396
action = opts .action ,
397
397
router = opts .router ,
398
398
lstart = opts .lstart ,
408
408
local M = {
409
409
_url_template_engine = _url_template_engine ,
410
410
_worker = _worker ,
411
- _void_link = _void_link ,
411
+ _sync_link = _sync_link ,
412
412
_router = _router ,
413
413
_browse = _browse ,
414
414
_blame = _blame ,
0 commit comments