From 9a751037ce5952470ed722096cbe4dd9cd3a553c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Fr=C3=B3es=20Franco?= Date: Thu, 28 May 2026 21:20:15 -0300 Subject: [PATCH] fix(vim): redraw after :NuwikiExportBrowse shells out to the browser A silent `:!xdg-open`/`:!open` swaps to the shell's alternate screen and returns without repainting, leaving the editor UI garbled until the next redraw. Force a full repaint after launching the browser. Neovim already avoids this via async jobstart. Co-Authored-By: Claude Opus 4.7 --- autoload/nuwiki/commands.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/autoload/nuwiki/commands.vim b/autoload/nuwiki/commands.vim index 8fc3914..2e7f976 100644 --- a/autoload/nuwiki/commands.vim +++ b/autoload/nuwiki/commands.vim @@ -598,7 +598,12 @@ function! s:open_browser(notification) abort silent execute '!xdg-open ' . shellescape(l:url, 1) . ' &' else echom 'nuwiki: exported → ' . l:url + return endif + " A silent `:!` shells out via the alternate screen and returns without + " repainting, leaving the editor UI garbled until the next redraw. Force a + " full repaint so the browser launch doesn't leave visual artifacts behind. + redraw! endfunction " ===== File ops =====