Skip to content

Commit

Permalink
Minor fixes for cursor drawing
Browse files Browse the repository at this point in the history
  • Loading branch information
akiyosi committed Dec 13, 2024
1 parent aaefb46 commit 5420dab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion editor/cursor.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
type Cursor struct {
widgets.QWidget

row, col int
smoothMoveAnimation *core.QPropertyAnimation
charCache *Cache
font *Font
Expand Down Expand Up @@ -647,7 +648,11 @@ func (c *Cursor) update() {
row, col := c.getRowAndColFromScreen()

// update cursor text
c.updateCursorText(row, col, win)
if !(c.row == row && c.col == col) {
c.row = row
c.col = col
c.updateCursorText(row, col, win)
}

// update cursor shape
c.updateCursorShape()
Expand Down

0 comments on commit 5420dab

Please sign in to comment.