Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Handle multiple selections intersecting a line in duplicateLines #13602

Merged
merged 1 commit into from
Jan 13, 2017

Conversation

nathansobo
Copy link
Contributor

duplicate lines 2

Closes #13047 because I opted to take a fairly different approach to also solve for the case where selections spanning multiple lines intersect the same line more than once. That PR also didn't have tests and I didn't have push access to the branch. Thanks to @seusher for getting the process of fixing this started though.

/cc @ungb for more testing. I suggest you try to break this with diabolical selections.

@ungb
Copy link
Contributor

ungb commented Jan 12, 2017

@nathansobo
if my selection wraps it stays together, if it doesn't, it yields different result

testdup

wrapped and unwrapped

@nathansobo
Copy link
Contributor Author

@ungb Yeah, that's actually intentional. The idea is to duplicate the minimal number of lines intersected by selections. In the case where selections are on adjacent lines but don't span across them, I chose to treat them individually. To me that seems like the most intuitive behavior. Did you find anything else or can we 🚢 ?

@nathansobo nathansobo merged commit 6d415e0 into master Jan 13, 2017
@nathansobo nathansobo deleted the ns-fix-duplicate-lines branch January 13, 2017 18:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants