fix: fix winhl does'not work

This commit is contained in:
JuanZoran 2023-01-25 14:56:52 +08:00
parent 561935ccd7
commit cb5d22a3b5
3 changed files with 3 additions and 3 deletions

View File

@ -255,7 +255,6 @@ require'Trans'.setup {
**示例:**
> 示例中展示, 将`mm`映射成快捷键
```lua
-- normal-mode
vim.keymap.set({'n', 'v'}, 'mm', '<Cmd>Translate<CR>')
vim.keymap.set('n', 'mi', '<Cmd>TranslateInput<CR>')

View File

@ -3,7 +3,6 @@ local m_window
local m_result
local m_content
local engine_map = {
['本地'] = 'offline',
['百度'] = 'baidu',

View File

@ -264,7 +264,9 @@ return function(entry, option)
win:bufset('buftype', 'nofile')
api.nvim_win_set_hl_ns(win.winid, win.hl)
win:set('winhl', 'Normal:TransWin,FloatBorder:TransBorder,NormalFloat:TransBorder')
win:set_hl('Normal', { link = 'TransWin' })
win:set_hl('FloatBorder', { link = 'TransBorder' })
win:set_hl('NormalFloat', { link = 'TransBorder' })
---@diagnostic disable-next-line: return-type-mismatch
return win
end