Skip to content
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

Implement black hole register #1165

Merged
merged 1 commit into from
Nov 28, 2021
Merged

Conversation

ath3
Copy link
Contributor

@ath3 ath3 commented Nov 25, 2021

No description provided.

@@ -1710,8 +1710,9 @@ fn delete_selection_impl(cx: &mut Context, op: Operation) {
let values: Vec<String> = selection.fragments(text).map(Cow::into_owned).collect();
let reg_name = cx.register.unwrap_or('"');
let registers = &mut cx.editor.registers;
let reg = registers.get_mut(reg_name);
reg.write(values);
if let Some(reg) = registers.get_mut(reg_name) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The check on line 1708 is now not necessary, but i left it there, because otherwise calculating values to store is unnecessary, and delete/change is often used as noyank version (at least i use them a lot)

@ath3 ath3 force-pushed the black-hole-register branch from 5972f66 to f10d6c9 Compare November 25, 2021 16:13
@archseer archseer merged commit 1d773bc into helix-editor:master Nov 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants