modify `duplicateLine` to keep cursor still
see https://github.com/zyedidia/micro/pull/3635
- when duplicating line it will keep the cursor still, this allows for bindings similar to
DuplicateLine,CursorDownto duplicate down or justDuplicateLinefor duplicating up
i'm also having trouble implementing a "selection down" action that moves the entire selection down, it will only move the selection down one line while DuplicateLine may add more than one line
@dmaluka what are your thoughts on the "selection down" action?
also fixes issue where undo
Does it?
what are your thoughts on the "selection down" action?
I remember you suggested it in https://github.com/zyedidia/micro/pull/3635#issuecomment-2623181017 but it doesn't make a lot of sense to me to have such a "generic" action independent of Duplicate*. The text below the selection is generally not the same text as where the selection is, it is a completely different text. So if we move the selection down, what happens? Some random part of this text gets selected, which is hardly useful.
not entirely sure anymore, i think its safe for this to put in as is. maybe keeping the cursor still is all that should be merged