Improve macro & dot-repeat support (#363)
* manual support dot-repeat * cmdwin and terminal * cmdline only * Fix * fix * Improve * Fix test * Support macro * disable cmdline for now * Simplify * fmt * consume once * Ignore = type * cmdline * Remove cmdline features
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
local mapping = setmetatable({}, {
|
||||
local api = require('cmp.utils.api')
|
||||
|
||||
local mapping
|
||||
mapping = setmetatable({}, {
|
||||
__call = function(_, invoke, modes)
|
||||
return {
|
||||
invoke = function(...)
|
||||
invoke(...)
|
||||
end,
|
||||
modes = modes or { 'i' },
|
||||
}
|
||||
if type(invoke) == 'function' then
|
||||
return {
|
||||
invoke = function(...)
|
||||
invoke(...)
|
||||
end,
|
||||
modes = modes or { 'i' },
|
||||
}
|
||||
end
|
||||
return invoke
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user