Skip to content

Commit

Permalink
fix: reduce some flickering when updating views
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Oct 27, 2022
1 parent c09d197 commit f39b657
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lua/noice/view/nui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@ function NuiView:show()
self:create()
end

vim.bo[self._nui.bufnr].modifiable = true
self:render(self._nui.bufnr)
vim.bo[self._nui.bufnr].modifiable = false

if not self._nui._.mounted then
self._nui:mount()
end
Expand All @@ -269,10 +273,6 @@ function NuiView:show()
self:smart_move()
end

vim.bo[self._nui.bufnr].modifiable = true
self:render(self._nui.bufnr)
vim.bo[self._nui.bufnr].modifiable = false

self._scroll.winnr = self._nui.winid
self._scroll:show()
self:fix_border()
Expand Down

0 comments on commit f39b657

Please sign in to comment.