Skip to content

Conversation

@hymkor
Copy link
Contributor

@hymkor hymkor commented Nov 18, 2024

The default value when arguments are omitted, was not set as 1.

image

This behaviour was not reproduced on the new Windows Terminal. I do not know the reason.

image

If no problems, could you please merge my patch ?

ESC_F.go

//go:build run

package main

import (
	"fmt"

	"github.com/mattn/go-colorable"
)

func main() {
	o := colorable.NewColorableStdout()

	fmt.Fprint(o, "First line\n")
	fmt.Fprint(o, "\x1B[FSecond line\n")
}

ESC_E.go

//go:build run

package main

import (
	"fmt"

	"github.com/mattn/go-colorable"
)

func main() {
	o := colorable.NewColorableStdout()

	fmt.Fprint(o, "First line\n")
	fmt.Fprint(o, "\x1B[ESecond line\n")
}

@mattn mattn merged commit 603fb50 into mattn:master Nov 18, 2024
21 of 24 checks passed
@mattn
Copy link
Owner

mattn commented Nov 18, 2024

Thank you

@hymkor hymkor deleted the fork-20241118 branch November 18, 2024 12:22
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