Skip to content

Commit

Permalink
fix: visual-multi compatibility (#389) (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
mg979 authored Jan 7, 2023
1 parent b7e0b1f commit 01334bb
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lua/which-key/view.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ M.auto = false
M.count = 0
M.buf = nil
M.win = nil
M.is_visual_multi_mode = nil

function M.is_valid()
return M.buf
Expand All @@ -26,7 +25,9 @@ function M.is_valid()
end

function M.show()
M.is_visual_multi_mod = vim.b.visual_multi
if vim.b.visual_multi then
vim.b.VM_skip_reset_once_on_bufleave = true
end
if M.is_valid() then
return
end
Expand Down Expand Up @@ -137,10 +138,6 @@ function M.hide()
vim.api.nvim_win_close(M.win, true)
M.win = nil
end
if M.is_visual_multi_mod then
M.is_visual_multi_mod = false
vim.cmd([[normal \\gS]]) -- reselect visual-multi text
end
vim.cmd("redraw")
end

Expand Down

0 comments on commit 01334bb

Please sign in to comment.