Skip to content

Commit

Permalink
chore(cursor): invert SetCursorStyle blink argument (true=blink)
Browse files Browse the repository at this point in the history
  • Loading branch information
meowgorithm committed Nov 6, 2024
1 parent 65514b9 commit d18aee5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cursor.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ type setCursorStyle int

// SetCursorStyle is a command that sets the terminal cursor style. Steady
// determines if the cursor should blink or not.
func SetCursorStyle(style CursorStyle, steady bool) Cmd {
func SetCursorStyle(style CursorStyle, blink bool) Cmd {
// We're using the ANSI escape sequence values for cursor styles.
// We need to map both [style] and [steady] to the correct value.
style = (style * 2) + 1
if steady {
if !blink {
style++
}
return func() Msg {
Expand Down

0 comments on commit d18aee5

Please sign in to comment.