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

example/simple: progress bar scrolls terminal #16

Open
sbinet opened this issue Jan 27, 2016 · 1 comment
Open

example/simple: progress bar scrolls terminal #16

sbinet opened this issue Jan 27, 2016 · 1 comment

Comments

@sbinet
Copy link

sbinet commented Jan 27, 2016

hi,

looking at #3 and event after specifying the bar.Width to, say, 60:

$> git diff
diff --git a/example/simple/simple.go b/example/simple/simple.go
index d8d912b..2af47af 100644
--- a/example/simple/simple.go
+++ b/example/simple/simple.go
@@ -9,6 +9,7 @@ import (
 func main() {
        uiprogress.Start()            // start rendering
        bar := uiprogress.AddBar(100) // Add a new bar
+       bar.Width = 60

        // optionally, append and prepend completion and elapsed time
        bar.AppendCompleted()

I still get:

$> go run ./simple.go
    0 [----------------------------------------------------------]   1%
    0 [----------------------------------------------------------]   2%
    0 [----------------------------------------------------------]   2%
[...]
   1s [=========================================================>]  99%
   1s [=========================================================>]  99%
   1s [==========================================================] 100%
   1s [==========================================================] 100%

my terminal is rxvt:

$> echo $TERM
rxvt-unicode-256color

(but even with TERM=vt100, I get the above behaviour)

is there something I am doing wrong?

lotrfan added a commit to lotrfan/uilive that referenced this issue Jul 16, 2016
XTerm interprets "cursor up N lines" as "cursor up 1 line" for all N <=
0. rxvt-unicode (and possibly others), however, treat "cursor up 0
lines" as moving 0 lines.

Fixes gosuri/uiprogress#16
lotrfan added a commit to lotrfan/uilive that referenced this issue Jul 16, 2016
XTerm interprets "cursor up N lines" as "cursor up 1 line" for all N <=
0. rxvt-unicode (and possibly others), however, treat "cursor up 0
lines" as moving 0 lines.

Fixes gosuri/uiprogress#16
@sammyrnycreal
Copy link

sammyrnycreal commented Mar 23, 2017

Same as issue #3. I observed is if the terminal window is wide, this error does not occur.

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 a pull request may close this issue.

2 participants