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

acme: use Edit for <, |, > and to trim spaces during Put #593

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

swasey
Copy link
Contributor

@swasey swasey commented Dec 10, 2022

Programs reading the event file now notice effects on the body from <, |, and Put.

Programs reading the event file now notice effects on the body from <,
|, and Put.
@@ -243,6 +243,16 @@ execute(Text *t, uint aq0, uint aq1, int external, Text *argt)
free(r);
return;
}
/* Prefer Edit's <, |, > */
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has an unintended side-effect.

With the original code, clicking with button 2 on something like |ind would set the selection to the output of the command. This version sets the selection to the empty string before that output.

I'll sort it out.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

FWIW, the side effect on dot in acme's Edit |cmd does not happen in sam. I'm inclined to regard acme's behavior as wrong and fix it, leaving this interpretation of |cmd alone.

(The new Put code should likely preserve dot.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

/cc @rsc in case you have strong opinions.

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.

1 participant