fix: know bug can't detect table key extended correctly
This commit is contained in:
parent
29f12aa107
commit
b12bef50f9
@ -13,3 +13,6 @@
|
||||
- [x] Add Query FallBack
|
||||
- [ ] Check if str is a word
|
||||
- [ ] Unlimit width for sentence
|
||||
|
||||
|
||||
- default_strategy can't deal with table correctly
|
||||
|
@ -69,7 +69,7 @@ end
|
||||
|
||||
---Expand window [width | height] value
|
||||
---@param opts
|
||||
---|{ field: string, to: integer}
|
||||
---|{ field: 'width'|'height', to: integer}
|
||||
function window:smooth_expand(opts)
|
||||
local field = opts.field -- width | height
|
||||
local from = api['nvim_win_get_' .. field](self.winid)
|
||||
@ -77,15 +77,13 @@ function window:smooth_expand(opts)
|
||||
|
||||
if from == to then return end
|
||||
|
||||
|
||||
local pause = Trans.util.pause
|
||||
local method = api['nvim_win_set_' .. field]
|
||||
|
||||
|
||||
local wrap = self:option 'wrap'
|
||||
local interval = self.animation.interval
|
||||
for i = from + 1, to, (from < to and 1 or -1) do
|
||||
self:set('wrap', false)
|
||||
local interval = self.animation.interval or 12
|
||||
for i = from + 1, to, (from < to and 1 or -1) do
|
||||
method(self.winid, i)
|
||||
pause(interval)
|
||||
end
|
||||
|
@ -168,6 +168,7 @@ end
|
||||
|
||||
---Defer function when process done
|
||||
function M:defer()
|
||||
Trans.util.main_loop(function()
|
||||
self.window:set('wrap', true)
|
||||
self.buffer:set('modifiable', false)
|
||||
|
||||
@ -184,6 +185,7 @@ function M:defer()
|
||||
end, 0)
|
||||
end,
|
||||
})
|
||||
end)
|
||||
end
|
||||
|
||||
---Display Result in hover window
|
||||
@ -221,7 +223,6 @@ function M:process(data)
|
||||
local window = self.window
|
||||
local lines = buffer:lines()
|
||||
|
||||
|
||||
local valid = window and window:is_valid()
|
||||
local width =
|
||||
valid and
|
||||
|
Loading…
x
Reference in New Issue
Block a user