From 986fca5ffc354f48f2c329c8dff8a41632832600 Mon Sep 17 00:00:00 2001 From: MagicDuck Date: Fri, 30 Aug 2024 12:11:28 -0700 Subject: [PATCH] fixing crash in nighly due to extmarks being cleared after buffer lines are removed --- lua/grug-far/render/resultsList.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/grug-far/render/resultsList.lua b/lua/grug-far/render/resultsList.lua index 841bb602..2d45e76b 100644 --- a/lua/grug-far/render/resultsList.lua +++ b/lua/grug-far/render/resultsList.lua @@ -334,8 +334,8 @@ end function M.clear(buf, context) -- remove all lines after heading and add one blank line local headerRow = context.state.headerRow - setBufLines(buf, headerRow, -1, false, { '' }) vim.api.nvim_buf_clear_namespace(buf, context.locationsNamespace, 0, -1) + setBufLines(buf, headerRow, -1, false, { '' }) context.state.resultLocationByExtmarkId = {} context.state.resultsLastFilename = nil context.state.resultMatchLineCount = 0