-
-
Notifications
You must be signed in to change notification settings - Fork 194
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 an option to control the save of clipboard content before killing. #1738
Conversation
src/commands/edit.lisp
Outdated
@@ -60,6 +60,8 @@ | |||
(define-key *global-keymap* "C-_" 'redo) | |||
(define-key *global-keymap* "C-/" 'redo) | |||
|
|||
(defparameter *save-interprogram-clipboard-before-kill-p* nil) |
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.
I think this variable is unnecessary as it will only complicate things.
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.
But this behaviour probably shouldn't be enabled by default, since somebody may have copied their password before killing in Lem, if this is enabled by default, their password would be in the killring, which is probably not great.
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.
I think of adding a function to view/edit/clear the killring.
Would that solve the problem?
Also should we consider the possibility that the password copied to killring could be stolen by malware targeting Lem, even if it means sacrificing convenience?
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.
Also should we consider the possibility that the password copied to killring could be stolen by malware targeting Lem, even if it means sacrificing convenience?
That's a fair point, since the user has a higher chance to press C-y
accidentally and paste his password into the buffer. I'll remove this then.
Previously, if someone have enabled relative line numbers, and have the attribute of active line number (the line number of the line where the point is) different than that of normal line number, they will see something like this: ``` 1 ... *2*... | <- this is where the point is, *2* means 2 is highlighted. 1 ... *2*... line number still highlighted, while the point is NOT here! 3 ... ```
Dang it, I didn't mean to push 68678b6 here. Well, since it's here, maybe you can review it all together? The issue I tried to address in 68678b6: Previously, if someone have enabled relative line numbers, and have the attribute of active line number (the line number of the line where the point is) different than that of normal line number, they will see something like this:
|
I think it's a good improvement. |
Users can now set
*save-interprogram-clipboard-before-kill-p*
in packagelem-core/commands/edit
to choose whether or not to save the interprogram (system) clipboard content into killring before killing other things in Lem.I'm a bit concerned about performance of
(string= clipboard-string (peek-killring-item (current-killring) 0)
if the clipboard data is very huge.