Skip to content

Commit 1c95813

Browse files
fix: handle rendering empty buffers
## Details Issue: #597 Since we entirely skip rendering empty buffers if a buffer is cleared it can cause extmarks to be left behind and not cleaned up. Skipping empty buffers was added to fix how LSP hover buffers were created, where they were initially empty, then later content was added. However due to this order the debounce would skip rendering the latter. To fix all of these interactions we now simply do not debounce when rendering an empty buffer. As a result any decorations left should now be properly cleaned up and content being added later should not get skipped via the debounce.
1 parent 48b4175 commit 1c95813

4 files changed

Lines changed: 12 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313
[996ec12](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/996ec12e1164e56401babf236c56cb2d9321d923)
1414
- support math superscript characters and body transformer for footnotes [48934b4](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/48934b49a2363b49ae1d698ed4cb30fb79d7efe8)
1515

16+
### Bug Fixes
17+
18+
- separate twitter and x link icons [#604](https://github.com/MeanderingProgrammer/render-markdown.nvim/pull/604)
19+
[b3efd64](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/b3efd6408e4e4d66d6caaee0579e72b579bc0884)
20+
21+
### Collaborator Shoutouts
22+
23+
- @calebdw
24+
1625
## 8.11.0 (2026-01-07)
1726

1827
### Features

doc/render-markdown.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*render-markdown.txt* For NVIM v0.11.6 Last change: 2026 February 03
1+
*render-markdown.txt* For NVIM v0.11.6 Last change: 2026 February 22
22

33
==============================================================================
44
Table of Contents *render-markdown-table-of-contents*

lua/render-markdown/core/ui.lua

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,8 @@ function Updater:start()
7171
if not env.valid(self.buf, self.win) then
7272
return
7373
end
74-
if env.buf.empty(self.buf) then
75-
return
76-
end
7774
self.decorator:schedule(
78-
self:changed(),
75+
self:changed() and not env.buf.empty(self.buf),
7976
self.config.debounce,
8077
log.runtime('update', function()
8178
self:run()

lua/render-markdown/health.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ local state = require('render-markdown.state')
66
local M = {}
77

88
---@private
9-
M.version = '8.11.7'
9+
M.version = '8.11.8'
1010

1111
function M.check()
1212
M.start('versions')

0 commit comments

Comments
 (0)