-
Notifications
You must be signed in to change notification settings - Fork 12
down(0) moves down one #5
Comments
Hi, I'm sorry but I don't seem to understand what you are trying to accomplish and I'm not able to reproduce it with the code you linked.
There is no check in the What terminal and shell are you running? Maybe I can help you from there. |
OK, I get that node-terminal is just a wrapper, so perhaps it is fine that you choose to do nothing about this. What I am saying is that 'down(0)' shouldn't move down, when that's what it seems to do. Obviously, I'm not really calling 'down()' with a hard-wired '0', but using a variable. Of course, I could be mistaken or something, but anyway... I'm using Ubuntu 13.04, gnome-terminal, and TERM seems to be set to 'xterm', I'm using /bin/bash (not sure why that is relevant, but anyway). I wouldn't object to you closing this, if you decide that's the appropriate action. |
The (or a) VT100 spec says \033[xB, where x is is 0 should move down 0 lines. If this is not the case this is in the hands of the terminal implementation. As said before, this is just a simple wrapper sending escape sequences, it is up to the terminal implementation to handle them.
If a check on I'm not going to implement a check in the methods right now since I currently don't have the time to research the spec and movement sequences for several terminal implementations. Pull requests with checks based on the spec are welcome though. |
I've noticed that down(0) actually moves down one line when it's at the bottom of the terminal. Any ideas why?
I've had to 'if' it out.
See here :
https://github.com/davidmaxwaterman/progress
commit b86f400f3d05faed70b0468e38bba6f830b844f1 shows the error (and the commit after it has the 'if'to fix it)
If you do the above at the top of the terminal window, it scrolls down endlessly, but if at the bottom, it doesn't. Having said that, while writing this, it doesn't seem to make sense, so perhaps I'm not completely understanding what's happening, but anyway, the if seems to fix it.
Comments/help welcome.
The text was updated successfully, but these errors were encountered: