Alexey-T / CudaText

Cross-platform text editor, written in Free Pascal
Mozilla Public License 2.0
2.51k stars 173 forks source link

Vertical mode and m-caret move #2448

Closed zydxhs closed 4 years ago

zydxhs commented 4 years ago

I tried the version 1.97, in vertical mode, and multi caret, after moving the cursor to the right(ctrl + right) to the end of the line, it moves to the next line. Again, moving to the left has the same problem.

This is a rendering of CudaText: cudatext

I like the behavior of the EmEditor implementation, it looks like this: emeditor

Alexey-T commented 4 years ago

Seems you suggest this- in "caret_after_end":false mode if we have 1 caret, right-key at end of line, moves to next line if 2+ carets, right-key at end of line, stays as is. Yes? @kvichans @OlehL @dinkumoil

Alexey-T commented 4 years ago

Made this, as default beh-r, w/o an option (not sure option is needed).

kvichans commented 4 years ago

"Stay at line end" will give a problem. Carets will not restore state after backward step with LEFT key

Alexey-T commented 4 years ago

So making the option is needed, Ok

Alexey-T commented 4 years ago

added the option. Default is “stay at end”

kvichans commented 4 years ago

Default is bad! Need to save workflow old users

Alexey-T commented 4 years ago

Ok, fixed the default

kvichans commented 4 years ago

Thanks

Alexey-T commented 4 years ago

@zydxhs Check how new option works: https://yadi.sk/d/Dkx9Ajujr_UfRg

zydxhs commented 4 years ago

Thanks for all. It's not exactly what I wanted. if we have 1 caret, right-key at end of line, moves to next line. if 2+ carets, right-key at end of line, stays as is. @kvichans @OlehL @dinkumoil this is ok

But notice that moving means not only direction key, but also CTRL + direction key.

Alexey-T commented 4 years ago

Okay, agreed, Ctrl+arrows will be fixed too, wait for next upd.

zydxhs commented 4 years ago

Thanks

Alexey-T commented 4 years ago

Beta https://yadi.sk/d/Dkx9Ajujr_UfRg

zydxhs commented 4 years ago

It's nice!