| 416 | } |
| 417 | |
| 418 | void 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 | |
| 433 | bool CodeEditor::isHighlightingCurrentLine() const |
| 434 | { |