Skip to content

Commit

Permalink
Little formattings
Browse files Browse the repository at this point in the history
  • Loading branch information
maxlandon committed Dec 5, 2023
1 parent cd5851c commit 620cdc9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions internal/keymap/cursor.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ func (c CursorStyle) String() string {
if !found {
return string(cursorUserDefault)
}

return cursor
}

Expand Down Expand Up @@ -49,10 +50,6 @@ var defaultCursors = map[Mode]CursorStyle{

// PrintCursor prints the cursor for the given keymap mode,
// either default value or the one specified in inputrc file.
// TODO: I've been quite vicious here, I need to admit: the logic
// is not made to use the default user cursor in insert-mode.
// It didn't bother. And if that can help some getting to use
// .inputrc, so be it.
func (m *Engine) PrintCursor(keymap Mode) {
var cursor CursorStyle

Expand All @@ -65,8 +62,8 @@ func (m *Engine) PrintCursor(keymap Mode) {
return
}

if cursor, valid := defaultCursors[keymap]; valid {
fmt.Print(cursors[cursor])
if defaultCur, valid := defaultCursors[keymap]; valid {
fmt.Print(cursors[defaultCur])
return
}

Expand Down

0 comments on commit 620cdc9

Please sign in to comment.