gchp / iota

A terminal-based text editor written in Rust
MIT License
1.62k stars 80 forks source link

Clipboard and selection actions #143

Closed jncraton closed 6 years ago

jncraton commented 6 years ago

I've added some features that you may or may not be interested in.

This PR adds the following line and selection based actions:

Many of these commands operate on the "current selection", which for now is just the current line. These will operate on the actual current selection once that's implemented, or the current line if nothing is selected.

As part of implementing this, I noticed that unicode was quite broken and converted the internal gap buffer to store unicode chars rather than simple bytes. This seems to make unicode work properly in my limited testing.

I also added several tests for my new features and one for basic unicode support.

I put this together to scratch my personal itches, so if it isn't something that you want to pull, that's no problem. I just thought I'd pass it along in case you are interested.

jncraton commented 6 years ago

I'm going to close this assuming that it is too large of a change to be easily included.