diff --git a/src/gui/shell.cpp b/src/gui/shell.cpp index a8ea05025..b9d042ea6 100644 --- a/src/gui/shell.cpp +++ b/src/gui/shell.cpp @@ -326,6 +326,9 @@ void Shell::init() return; } + if (!m_shown) { // Defer displaying the shell until colors have been set. + setVisible(false); + } connect(m_nvim->api0(), &NeovimApi0::neovimNotification, this, &Shell::handleNeovimNotification); connect(m_nvim->api0(), &NeovimApi0::on_ui_try_resize, @@ -1127,8 +1130,11 @@ void Shell::handleDefaultColorsSet(const QVariantList& opargs) setBackground(backgroundColor); setSpecial(specialColor); - // Cells drawn with the default colors require a re-paint - update(); + // Display the shell now that the default colors have been set. + if (!m_shown) { + setVisible(true); + m_shown = true; + } emit colorsChanged(); } diff --git a/src/gui/shell.h b/src/gui/shell.h index 69562dc70..b8c8126ce 100644 --- a/src/gui/shell.h +++ b/src/gui/shell.h @@ -194,6 +194,7 @@ private slots: private: bool m_init_called{ false }; bool m_attached{ false }; + bool m_shown { false }; NeovimConnector* m_nvim{ nullptr }; QList m_deferredOpen;