[BUG] `<a-s>` does not preserve the orginal main cursor selection
Author: kmafeni04Created Aug 12, 2026Updated Aug 12, 2026
Labelsbug
Version of Kakoune
v2026.05.21
Reproducer
Buffer:
This is a line
This is a line
This is a line
This is a lineCommand: :exec '%<a-semicolon><a-s>'; echo %val{cursor_line}
Outcome
When using <a-s>, the main cursor moves to bottom of all the selections instead of remaining where it was
If my selection is [ ] and my main cursor is ->, pressing <a-s> moves the main cursor from:
-> [ This is a line
This is a line
This is a line
This is a line ]to:
[ This is a line ]
[ This is a line ]
[ This is a line ]
-> [ This is a line ]Expectations
For the main cursor to remain at the top line
Additional information
No response
Source: mawww/kakoune