-
Notifications
You must be signed in to change notification settings - Fork 25
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
base: master
Are you sure you want to change the base?
Conversation
…o address the target text. Allows chording from outside the window.
} | ||
// Now check for a chord command | ||
acmeaddr := os.Getenv("acmeaddr") | ||
if acmeaddr != "" { |
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 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).
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.
Created plan9port issue: 9fans/plan9port#533
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.
Edwood has the same bug, and I now have a patch to fix edwood.
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.
Edwood is now patched.
} | ||
for _, w := range windows { | ||
if w.Name == file { | ||
return w.ID, offset, 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 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.
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.
Xerox. You don't know the window id, just the file name.
This allows chording from outside the window & its tag.
Addresses #42