v0.15.0 password recovery, phone layout, CLI pager, embed policy fixes
This commit is contained in:
1 parent
a999177f0c
commit
e1fa5242e3
48 files changed
+2101
-135
No files matched your search
@@ -0,0 +1,23 @@
|
||||
//go:build !js && !wasm
|
||||
|
||||
package display
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"golang.org/x/term"
|
||||
)
|
||||
|
||||
func init() {
|
||||
TermSize = func() (rows, cols int) {
|
||||
fd := int(os.Stdout.Fd())
|
||||
if !term.IsTerminal(fd) {
|
||||
return 0, 0
|
||||
}
|
||||
cols, rows, err := term.GetSize(fd)
|
||||
if err != nil {
|
||||
return 0, 0
|
||||
}
|
||||
return rows, cols
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user