Skip to content

Commit 15a49b5

Browse files
committed
fix: Fixed a big casuing hybrid mode to become active on mode change
1 parent 1dd1d30 commit 15a49b5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ftplugin/markdown.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@ vim.api.nvim_create_autocmd({ "ModeChanged", "TextChanged" }, {
164164
markview.keymaps.init(buffer, window, parsed_content, markview.configuration);
165165
end
166166

167+
if not markview.configuration.hybrid_modes or not vim.list_contains(markview.configuration.hybrid_modes, mode) then
168+
return;
169+
end
170+
167171
local cursor = vim.api.nvim_win_get_cursor(0);
168172
local start = math.max(0, cursor[1] - 1);
169173
local stop = math.min(lines, cursor[1]);

0 commit comments

Comments
 (0)