MCPcopy Create free account
hub / github.com/atomicgo/cursor / HorizontalAbsolute

Method HorizontalAbsolute

cursor_other.go:40–43  ·  view source on GitHub ↗

HorizontalAbsolute moves the cursor to n horizontally. The position n is absolute to the start of the line.

(n int)

Source from the content-addressed store, hash-verified

38// HorizontalAbsolute moves the cursor to n horizontally.
39// The position n is absolute to the start of the line.
40func (c *Cursor) HorizontalAbsolute(n int) {
41 n++ // Moves the line to the character after n
42 fmt.Fprintf(c.writer, "\x1b[%dG", n)
43}
44
45// Show the cursor if it was hidden previously.
46// Don't forget to show the cursor at least at the end of your application.

Callers 2

HorizontalAbsoluteFunction · 0.45
StartOfLineMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected