mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 07:00:04 +08:00
perf(neoyank): use notify api
This commit is contained in:
parent
1c31f7218a
commit
1d323bfcc3
@ -4,6 +4,7 @@ local conf = require("telescope.config").values
|
||||
local entry_display = require("telescope.pickers.entry_display")
|
||||
local finders = require("telescope.finders")
|
||||
local pickers = require("telescope.pickers")
|
||||
local notify = require('spacevim.api.notify')
|
||||
|
||||
local function prepare_neoyank_output(register)
|
||||
local lines = {}
|
||||
@ -54,9 +55,7 @@ local function show_yank_history(opts)
|
||||
vim.fn.setreg('"', entry.value[1])
|
||||
local ok, rst = pcall(vim.cmd, 'normal! p')
|
||||
if not ok then
|
||||
vim.g._spacevim_temp_err = rst
|
||||
-- @todo implement lua notify api
|
||||
local notify = vim.api.nvim_eval('SpaceVim#api#notify#get().notify(g:_spacevim_temp_err, "WarningMsg")')
|
||||
notify.notify(rst, 'WarningMsg')
|
||||
end
|
||||
vim.fn.setreg('"', reg)
|
||||
end)
|
||||
|
Loading…
Reference in New Issue
Block a user