---
title: "MoveCursorCommand"
description: "Moves the cursor with [amount] characters.

If there is selection, cancel the selection first and move the cursor to the selection start
position. Then perform the cursor movement."
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
class MoveCursorCommand(val amount: Int) : EditCommand
```


Moves the cursor with `amount` characters.

If there is selection, cancel the selection first and move the cursor to the selection start
position. Then perform the cursor movement.

#### Parameters

| | |
| --- | --- |
| amount | The amount of cursor movement. If you want to move backward, pass negative value. |




