Skip to content

Commit

Permalink
dev (#50)
Browse files Browse the repository at this point in the history
* Load default options

* fix stupid

* Fix clearline after input buffer

* Change UNIX newlines with returned newlines in display (more reliable)

* Always use original terminal file descriptor for low-level cursor
requests, and potentially most other virtual terminal sequences.

* Don't code too late in the night

* Fix term length

* Fix
  • Loading branch information
maxlandon authored Jun 5, 2023
1 parent a83d6ec commit aaf071b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/term/term.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ func GetWidth() (termWidth int) {
// GetLength returns the length of the terminal
// (Y length), or 80 if it cannot be established.
func GetLength() int {
width, _, err := term.GetSize(int(stdoutTerm.Fd()))
_, length, err := term.GetSize(0)

if err != nil || width == 0 {
if err != nil || length == 0 {
return defaultTermWidth
}

return width
return length
}

func printf(format string, a ...interface{}) {
Expand Down

0 comments on commit aaf071b

Please sign in to comment.