Skip to content

Commit

Permalink
fix: Fixed a big casuing hybrid mode to become active on mode change
Browse files Browse the repository at this point in the history
  • Loading branch information
OXY2DEV committed Aug 8, 2024
1 parent 1dd1d30 commit 15a49b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ftplugin/markdown.lua
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ vim.api.nvim_create_autocmd({ "ModeChanged", "TextChanged" }, {
markview.keymaps.init(buffer, window, parsed_content, markview.configuration);
end

if not markview.configuration.hybrid_modes or not vim.list_contains(markview.configuration.hybrid_modes, mode) then
return;
end

local cursor = vim.api.nvim_win_get_cursor(0);
local start = math.max(0, cursor[1] - 1);
local stop = math.min(lines, cursor[1]);
Expand Down

0 comments on commit 15a49b5

Please sign in to comment.