fix: fix winhl does'not work
This commit is contained in:
parent
561935ccd7
commit
cb5d22a3b5
@ -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>')
|
||||
|
||||
|
@ -3,7 +3,6 @@ local m_window
|
||||
local m_result
|
||||
local m_content
|
||||
|
||||
|
||||
local engine_map = {
|
||||
['本地'] = 'offline',
|
||||
['百度'] = 'baidu',
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user