From 40c6a236c96e4d19e6b1826a2d6bf0e761f021a0 Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Tue, 12 Mar 2024 12:00:21 -0700 Subject: [PATCH] Ensure that the shell is always visible The old protocol may not send the default_colors_set message. Use a timer to make sure that the shell is always visible, even if no messages are sent by nvim. --- src/gui/shell.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gui/shell.cpp b/src/gui/shell.cpp index 19a602226..9886029f8 100644 --- a/src/gui/shell.cpp +++ b/src/gui/shell.cpp @@ -368,6 +368,15 @@ void Shell::init() // Set initial value m_nvim->api0()->vim_set_var("GuiWindowFrameless", (windowFlags() & Qt::FramelessWindowHint) ? 1: 0); + + // Make the shell visible even when default_colors_set is not received, + // e.g. when using the deprecated cell-based grid protocol. + QTimer::singleShot(300, [&]() { + if (!m_shown) { + setVisible(true); + m_shown = true; + } + }); } void Shell::neovimError(NeovimConnector::NeovimError err)