Open aecepoglu opened 3 months ago
Meow introduces a concept selection
. Here is the explanation.
https://github.com/meow-edit/meow/blob/master/EXPLANATION.org#selection
Yes, I am aware meow has selections. I am a previous kakoune user so I am comfortable using selections.
It's just that meow-line
should not cancel the selection. It should instead change the type of the selection and grow it
The selection will be expanded when current selection is expandable, and has the same type with command. In your case, I guess the selection is created with char movements, it will be canceled when met a line command. This selection
is not the one in kakoune.
I understand. my use case is:
when I press the keys o
e
(meaning (meow-block) (meow-line)
) I don't want (meow-line)
to cancel my existing selection. Similarly when I do o
.
l
(meaning (meow-block) (meow-bounds-of-thing 'line)
) I want to grow my region to contain full lines.
If I wanted to cancel my selection, I'd invoke (meow-cancel)
myself.
To force expand, there's a command meow-line-expand
, however it doesn't expand the beginning and the end at the same time. Probably we should make it work on all lines, since the line selection should always keep the same shape.
Would you be OK with me opening a PR for that?
I thin kthe answer is the final cond statement from my code sample above.
meow-line
should stay the same. It should cancel the selection with other types and expand itself.
And we can update meow-line-expand
according to your code, also add it to the documentation. As it's still a preserved, undocumented command at the moment.
Yes, I'm OK with a PR.
if the selection is like the following (M: mark, P: point)
then
meow-line
should turn it into the following and change the selection-type to(expand . line)
but it selects only the line point is on:
This can be accomplished with a function like so, and I can open a PR for this you agree with the change: