evil-scroll-start-column doesn't take apparent column into account
- Dominant language
- Emacs Lisp
- Stars
- 3.9k
- Forks
- 307
- PR merge metrics
- No merged PRs in 30d
Description
This is especially noticeable if `hscroll-margin` is a small number and we're in a buffer that uses lots of text in the `line-prefix` property, which is common in e.g. `org-indent-mode`.
Steps to reproduce:
- Set the `hscroll-margin` to something small, e.g. `(setq hscroll-margin 3)`
- Create a new `fundamental-mode` buffer, and insert some text on a line
- Evaluate this code to insert a line-prefix property for the current line:
```elisp
(put-text-property
(line-beginning-position)
(line-end-position)
'line-prefix
(make-string 20 ?\s))
```
- Move towards the center of the text, and invoke `evil-scroll-start-column`, or alternatively `z s`
I'd expect the buffer to scroll so that the cursor is only 3 columns away from the left margin of the window. Instead, it is 20 + 3 columns away.
Contributor guide
Assessment
This issue has not been assessed yet.