diff --git a/src/gui/shell.cpp b/src/gui/shell.cpp index a8ea05025..efc784da3 100644 --- a/src/gui/shell.cpp +++ b/src/gui/shell.cpp @@ -326,6 +326,10 @@ void Shell::init() return; } + // Pull Request#1101: Defer displaying the shell until colors have been set + if (!m_shown) { + setVisible(false); + } connect(m_nvim->api0(), &NeovimApi0::neovimNotification, this, &Shell::handleNeovimNotification); connect(m_nvim->api0(), &NeovimApi0::on_ui_try_resize, @@ -1127,8 +1131,15 @@ 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; + } + else { + // Cells drawn with the default colors require a re-paint + update(); + } emit colorsChanged(); } diff --git a/src/gui/shell.h b/src/gui/shell.h index 69562dc70..90a9cce4a 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;