# editor: indent from cursor position with a single selection \(\#10073\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/b43602f21b82357018233dd517036aa769756393)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: b43602f21b82357018233dd517036aa769756393

Requested commit: b43602f21b82357018233dd517036aa769756393

Commit: b43602f21b82357018233dd517036aa769756393

Tree: 8ca9f59f4cbec3530fd2e572afa48ed79e6968af

Author: Piotr Osiewicz

Committer: GitHub

## Message

```
editor: indent from cursor position with a single selection (#10073)

In 9970 @JosephTLyons noticed that tab + tab_prev action sequence leaves
a buffer in the dirty state, whereas "similar" indent-outdent does not.
I've tracked it down to the fact that tabs are always inserted at the
start of the line, regardless of the cursor position, whereas tab-prevs
act from cursor position.

This PR adjust tab/tab-prev actions (and indent-outdent) to act from
cursor position if possible. That way we can correctly report buffer
dirty state for these event sequences.

Fixes #9970 
Release Notes:

- Fixed buffer being marked as dirty when using tab/tab-prev actions.
```

## Parents

- [1dbd520cc9a0c6e93a656b1c531723f30f1d9894](https://git.cafe/gitcafe/zed/commit/1dbd520cc9a0c6e93a656b1c531723f30f1d9894?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/b43602f21b82357018233dd517036aa769756393?format=markdown)
