diff --git a/src/gui/shell.cpp b/src/gui/shell.cpp index f25374aed..e712fcfde 100644 --- a/src/gui/shell.cpp +++ b/src/gui/shell.cpp @@ -588,6 +588,8 @@ void Shell::handleRedraw(const QByteArray& name, const QVariantList& opargs) } else if (name == "popupmenu_hide") { m_pum.hide(); } else if (name == "mode_info_set") { + qDebug() << "mode_info_set"; + qDebug() << " " << opargs; handleModeInfoSet(opargs); } else if (name == "flush") { // Do Nothing, a notification that nvim is done redrawing. @@ -688,25 +690,13 @@ void Shell::handleModeChange(const QVariantList& opargs) return; } - const QString mode{ m_nvim->decode(opargs.at(0).toByteArray()) }; + //const QString mode{ m_nvim->decode(opargs.at(0).toByteArray()) }; const uint64_t modeIndex{ opargs.at(1).toULongLong() }; if (!m_cursor.IsStyleEnabled()) { - if (mode == "insert") { - m_cursor.SetColor({}); - m_cursor.SetStyle(Cursor::Shape::Vertical, 25); - m_cursor.SetTimer(0, 0, 0); - } - else if (mode == "replace") { - m_cursor.SetColor({}); - m_cursor.SetStyle(Cursor::Shape::Horizontal, 20); - m_cursor.SetTimer(0, 0, 0); - } - else { - m_cursor.SetColor({}); - m_cursor.SetStyle(Cursor::Shape::Block, 100); - m_cursor.SetTimer(0, 0, 0); - } + m_cursor.SetColor({}); + m_cursor.SetStyle(Cursor::Shape::Block, 100); + m_cursor.SetTimer(0, 0, 0); update(neovimCursorRect()); return; @@ -786,6 +776,8 @@ void Shell::handleModeInfoSet(const QVariantList& opargs) const bool cursor_style_enabled{ opargs.at(0).toBool() }; const QVariantList mode_info = opargs.at(1).toList(); + qDebug() << " cursor_style_enabled:" << cursor_style_enabled; + m_cursor.SetIsStyleEnabled(cursor_style_enabled); m_modeInfo = mode_info; }