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

Bug: Acme: addr does not print the correct end of selection after addr=dot #673

Open
spektrokalter opened this issue Sep 30, 2024 · 0 comments

Comments

@spektrokalter
Copy link

Expected behavior

It prints the beginning and end of the selection.

Unexpected behavior

It prints the beginning of the selection twice.

Steps to reproduce the problem

In fact, I do not know where the problem is located exactly, since I rely on 9fans.net/go/acme. Assuming it handles the API correctly, the steps are as follows:

Create a file with the following content, build it and run on any selection:

package main

import (
	"fmt"
	"os"
	"strconv"

	"9fans.net/go/acme"
)

func main() {
	winid, _ := strconv.Atoi(os.Getenv("winid"))
	w, _ := acme.Open(winid, nil)
	w.ReadAddr() // make sure "addr" is open
	w.Ctl("addr=dot")
	r0, r1, _ := w.ReadAddr()
	fmt.Println(r0, r1)
}

(Error handling is omitted intentionally.)

The address of the beginning is print twice, the end is lost.

plan9port version

a2567fc

9fans.net/go version

v0.0.7

OS version

macOS 14.5 (23F79)

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

No branches or pull requests

1 participant