-
-
Notifications
You must be signed in to change notification settings - Fork 226
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
2732 slurp barf multicursor #2733
base: dev
Are you sure you want to change the base?
2732 slurp barf multicursor #2733
Conversation
…multicursor mode and tidies only one selection anyway
…(which was extracted from rewrap)
✅ Deploy Preview for calva-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
You are awesome, @pbwolf! ❤️ I will have a closer look tomorrow. Must 💤 now. |
…rm is the one to format and is indented, the whole document gets reformatted
I found this issue, don't know if you are aware: [:a |:b] barf forward Expected: [:a|] :b Actual: [:a] |:b It's as if it attaches the cursor position to the closest form. Barfing forward from here works as expected: [:a| :b] |
@PEZ I added 2 unit tests to check that barf forward keeps the cursor within the shortened list, and made it do so. |
Hmm. Barf backward, also, can leave the cursor outside the narrowed form, unlike in version 486. |
…n the list that lost its first member
Added a unit test that barf backward keeps the cursor within the shortened list, and made it do so. |
I forgot to report back that I tested the barf forward after your fix and that it worked great. Now have also tested barf backward and it behaves beautifully. And I am getting addicted to multi cursor slurp and barf! |
"Undo" treats the formatting and the slurp/barf as two distinct events. Is that tolerable? |
Undo is a bit strange also in current Calva. Now tried with this branch, since you mentioned it. I think it is acceptable, as in I rather have multi cursor slurp and barf with these extra undo's than staying on single cursor. But it is a bit confusing. Especially when the formatting didn't do anything. We could release as is and try make it better later? |
I agree |
What has changed?
Slurp and barf trigger reformatting. This PR makes reformatting multicursor-capable (because reformatting had canceled multi-cursor mode).
Loose ends:
{multicursor:false}
option heeded), because the single-cursor case is not a distinct procedure. This deviation from documentation could be remedied in the documentation... but on the other hand, paredit's other multi-cursor support has been established for two or three years and the burden of supporting a feature flag might no longer be required?Wobbly parts:
Fixes #2732
My Calva PR Checklist
I have:
dev
branch. (Or have specific reasons to target some other branch.)published
. (Sorry for the nagging.)[Unreleased]
entry inCHANGELOG.md
, linking the issue(s) that the PR is addressing.npm run prettier-format
)npm run eslint
before creating your PR, or runnpm run eslint-watch
to eslint as you go).Ping @PEZ, @bpringe, @corasaurus-hex, @Cyrik