ulyssa / modalkit

A Rust library for building modal editing applications
Apache License 2.0
49 stars 5 forks source link

Add EditContext::get_last_column and EditContext::get_cursor_end #47

Closed ulyssa closed 1 year ago

ulyssa commented 1 year ago

The current method for determining whether it's okay to access the last column is very Vim-specific. I'm going to add a new method to EditContext which controls whether it is okay to use the last column during an EditAction::Motion.

I'm also going to add another method to allow controlling where the cursor gets placed after editing the buffer. This will allow implementing ~ in a more obvious way that will play nicely with using . to repeat case changes, and will also help in #32 with supporting Kakoune's <A-o>/<A-O>.