MCPcopy Create free account
hub / github.com/cpeditor/cpeditor / updateCursorWidth

Method updateCursorWidth

src/Editor/CodeEditor.cpp:418–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

416}
417
418void CodeEditor::updateCursorWidth()
419{
420 if (m_vimCursor || overwriteMode())
421 {
422 // setting the width to 0 also works, but would flicker when swithed to the narrow cursor
423 setCursorWidth(fontMetrics().maxWidth());
424 }
425 else
426 {
427 const auto oldRect = cursorRect();
428 setCursorWidth(SettingsHelper::getCursorWidth());
429 viewport()->update(oldRect); // prevent flickering
430 }
431}
432
433bool CodeEditor::isHighlightingCurrentLine() const
434{

Callers

nothing calls this directly

Calls 1

updateMethod · 0.80

Tested by

no test coverage detected