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

Use $acmeaddr to address the target text #43

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

Conversation

paul-lalonde
Copy link

@paul-lalonde paul-lalonde commented Oct 28, 2021

This allows chording from outside the window & its tag.
Addresses #42

…o address the target text. Allows chording from outside the window.
}
// Now check for a chord command
acmeaddr := os.Getenv("acmeaddr")
if acmeaddr != "" {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this condition is true only when you have a wrapper script around L that sets winid to empty. I don't see how $acmeaddr would be non-empty and $winid empty otherwise.

We should be checking $acmeaddr before $windid. If $acmeaddr is non-empty, it's a 2-1 cord. Plan 9 acme gets this correct. Plan9port acme has a bug where it sets $acmeaddr but never unsets it (forgetting we don't have rfork(RFENVG) in unix).

Copy link
Collaborator

Choose a reason for hiding this comment

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

Created plan9port issue: 9fans/plan9port#533

Copy link
Author

@paul-lalonde paul-lalonde Nov 1, 2021

Choose a reason for hiding this comment

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

Edwood has the same bug, and I now have a patch to fix edwood.

Copy link
Author

Choose a reason for hiding this comment

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

Edwood is now patched.

}
for _, w := range windows {
if w.Name == file {
return w.ID, offset, nil
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand why we need the offset. Once we have the window id, this program will take care of getting the current selection position in that window.

Copy link
Author

Choose a reason for hiding this comment

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

Xerox. You don't know the window id, just the file name.

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