Skip to content

Commit

Permalink
Ensure that the shell is always visible
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
davvid committed Mar 12, 2024
1 parent bb48a2a commit 40c6a23
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/gui/shell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 40c6a23

Please sign in to comment.