-
Notifications
You must be signed in to change notification settings - Fork 311
Supporting line wise yanks, including paste and undo. #811
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
Conversation
I updated this pull request via |
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.
Sorry it took forever for me to take a look
I have some general comments that need to be addressed and I'll try to take a closer look then, or maybe @daxian-dbw will beat me to it.
…esting internal helper classes.
Sorry, I force-pushed again because there was structural changes to address your general comments. From now on I will address your feedback with additional commits. |
This PR still shows changes requested even though I have carried out the changes. |
It looks like not all of the new tests were run in CI - presumably because test discovery isn't searching Microsoft.PowerShell.PSReadLine2.dll. I'd like @daxian-dbw to approve including tests like this before merging. |
The latest commit adds discovery and execution of thoses unit-tests. For this purpose, the main module is compiled with an alternate set of options and to a target assembly named @daxian-dbw, are you OK with these changes? |
Can we move the test code to |
I thought about doing this but was deterred as per @lzybkr’s comment. I would be happy to go ahead, but I do not know how to handle For this to work, there would need to be a strong-name snk file in the repository for signing both assemblies. The way I handled this in the past was for the owner of the repository to include an encrypted version of the release strong-name snk file in the repository, and use AppVeyor secure strings to decrypt the file during the build. Would that work for you @daxian-dbw? |
I don't think
I think you can just add |
I can’t believe I just learned about that fact today 😱😱! |
Thanks @springcomp! |
Build fixed. @springcomp Could you please review my changes? Thanks! |
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.
Yes, that is the reason why I created a separate file but this solution is certainly better.
With this PR, I intend to work next on implementing dd (delete line) and, possibly S (substitute line) as natural extensions, so am looking forward to seeing this merged. |
This is my take at #333.
I thought best to create a
ViRegister
class to replace the current_clipboard
String
because I wanted to support pasting "line wise" irrespective of where the cursor is at when pasting occurs. I created anevent
that gets raised each time the buffer is about to change as part of a paste operation, to hook into undo/redo without too much coupling.Please, let me know your thoughts and suggestions for improvements.