-
-
Notifications
You must be signed in to change notification settings - Fork 84
Add "after" delimiter-adding support to "paste" #128
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
Comments
That can be problematic combined with #127 |
@AndreasArvidsson is this one not solved in latest slew of PRs? |
@pokey Not at all. Since we are using the built in paste now it would require large rewrites to get it working. |
Ah right fair point. I really go back and forth on the built-in paste vs custom. Another argument for custom is that I think I'd argue that "bring" and "paste" should behave roughly the same. But yeah then we'd need to recreate the multi-line multi-selection copy tracking logic. Idk |
Although couldn't we solve this one fairly easily by inserting delimiter, then moving cursor before / after it then issuing paste? |
Yes that's the only viable solution but that's not easy right now with how the code looks. Then we will have one edit we control and one edit we don't and we need to update selections on both. Doable of course but not that easy. |
I think the best way to solve this is
@pokey Sounds good? |
Looks good to me! Worth mentioning that we should make sure clipboard state is kept in global storage so it can be shared across windows Also would be awesome if you're able to scare up that link to the VSCode implementation again |
Some of the interesting parts are here I can't right now find where they actually check that you haven't updated the clipboard outside of vscode. But I would assume it's something like:
And if we want a clipboard history we definitely need to do something like this. |
I was never able to find that check either fwiw. Slightly worrying 🤔 |
According to my tests they must have a check like that or a hook whenever the clipboard changes because if you copy something out of vscode the paste behavior/content is updated. |
I mean yeah I can definitely believe it, just slightly worrying neither of us can find the code. Would be good if we understand their code in order to make sure there isn't some fancy corner case handling that we miss by rolling our own |
* Fall back to full hat enablement on error * Refactor * Black
See https://github.com/pokey/cursorless-vscode/blob/5eada65c0a7cb6c34ba0682d8f06cc2f76fed0a1/src/actions/BringMoveSwap.ts#L115-L121
We'll probably do this one in tandem with #202
The text was updated successfully, but these errors were encountered: