-
Notifications
You must be signed in to change notification settings - Fork 699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for duplicating lines #792
Conversation
fn duplicate_line(&mut self, view: &View, config: &BufferItems) { | ||
let mut builder = delta::Builder::new(self.text.len()); | ||
// get affected lines | ||
let mut lines = BTreeSet::new(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part is almost the same as in modify_indent
. Perhaps there is a way to reuse the code...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that could make sense at some point, feels like this is okay for now though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good; the one thing missing is to add this to the docs.
fn duplicate_line(&mut self, view: &View, config: &BufferItems) { | ||
let mut builder = delta::Builder::new(self.text.len()); | ||
// get affected lines | ||
let mut lines = BTreeSet::new(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that could make sense at some point, feels like this is okay for now though.
I added it under "Other movement and deletion commands". Not sure if that is the right section though. |
I noticed Travis has been building this branch for a while. Maybe something got stuck? |
hmm, good point. I checked and it said it passed, just this graphic hasn't updated? |
hmm good point, I think I'd call that a bug. @scholtzan? |
Oh, I will look into it. |
Duplicates lines that are selected