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

Repeated output #40

Closed
wonderdogone opened this issue Sep 3, 2015 · 18 comments
Closed

Repeated output #40

wonderdogone opened this issue Sep 3, 2015 · 18 comments

Comments

@wonderdogone
Copy link

when you run the simple example like
var vantage = require("vantage")();

// Add the command "foo", which logs "bar".
vantage
.command("foo")
.description("Outputs 'bar'.")
.action(function(args, callback) {
this.log("bar");
callback();
});

vantage
.delimiter("websvr~$")
.listen(5003)
.show();

and you type foo, you get foo repeated then bar. Why is foo repeating?
websvr~$ foo
websvr~$ foo (this is the repeated output)
bar

@dthree
Copy link
Owner

dthree commented Sep 3, 2015

Can you try this for me:

After starting the app, press [enter] a few times, and then do the foo command. Does it still repeat this?

I had noticed a bug that the first output is doubled, earlier. Maybe this is the same thing.

@wonderdogone
Copy link
Author

yup same result after many returns
websvr~$
websvr~$
websvr~$
websvr~$
websvr~$
websvr~$
websvr~$
websvr~$
websvr~$
websvr~$
websvr~$
websvr~$
websvr~$ foo
websvr~$ foo
bar
websvr~$

@dthree
Copy link
Owner

dthree commented Sep 3, 2015

K looking into it.

@wonderdogone
Copy link
Author

it has something to do with the input. after a few commands I start getting breaking on each character as i type

dive~$ s
dive~$ sh
dive~$ sho
dive~$ show
dive~$ shows
dive~$
dive~$
dive~$
dive~$
dive~$

@dthree
Copy link
Owner

dthree commented Sep 4, 2015

Hmm. If your vantage code is small, could you please paste it here? Also, what terminal are you using?
Thanks.

@METACEO
Copy link

METACEO commented Sep 9, 2015

  • The server.js code copied from the readme
  • Node.js v4.0.0
  • Vantage 1.5.1
  • PuTTY Release 0.63

Using the above, I too am experiencing the same as @wonderdogone. What I've found is the vertical height of the terminal determines this behavior, see below.

Too tall of terminal

tootall

Terminal just tall enough

tallenough
Once I have reached the bottom of my terminal, my keystrokes are no longer repeated (e.g. shown in the second photo, f and o was not repeated when I was typing foo at the bottom of the terminal.)

@dthree
Copy link
Owner

dthree commented Sep 9, 2015

@G3E9 you nailed it. That's so weird. It's not so much the terminal height, as the cursor has to be on the bottom of the page.

Going to look into this soon.

@METACEO
Copy link

METACEO commented Sep 9, 2015

heldkey
A better example.

@dthree
Copy link
Owner

dthree commented Sep 9, 2015

Yeah - I was able to reproduce it. Thanks.

Vorpal just recently switched to a newer version of inquirer (10x smaller), and this broke a bunch of things. This looks like the last thing left.

@METACEO
Copy link

METACEO commented Sep 9, 2015

It's not so much the terminal height, as the cursor has to be on the bottom of the page.

Right on. While I was just about to test with Vorpal, you sound like your on top of it!.. I've really been enjoying Vantage in my projects, awesome work!

@dthree
Copy link
Owner

dthree commented Sep 9, 2015

Thanks! Really glad you find it helpful!

@wonderdogone
Copy link
Author

yea I figured out its happening most of the time in the morning when i open a new terminal and cursor is at the top.

@dthree
Copy link
Owner

dthree commented Oct 11, 2015

This is fixed in Vorpal - I just have to migrate Vantage to the latest version of Vorpal.

@fiznool
Copy link
Contributor

fiznool commented Apr 9, 2016

@dthree

I had noticed a bug that the first output is doubled, earlier. Maybe this is the same thing.

I'm seeing this issue, is there any fix?

@xori
Copy link

xori commented Apr 11, 2016

I only see it when I connect from another process and I found that just typing vantage to open the initial console, then vantage server:port to connect to the intended server, stops the double output.

PS C:\code\bin\shar> vantage
local@mycomputer~$ vantage myserver:port
my-vantage-prompt> 

@samhagman
Copy link

Any update @dthree on integrating the newest Vorpal to resolve this issue as well as issues like #56 and anyone else that will try to use newer vorpal APIs? Thanks for this really cool library by the way.

@zakhenry
Copy link
Contributor

@samhagman the version of vorpal that vantage uses was brought up to date in #62 , by any chance was this issue fixed? I haven't noticed the issue in my own work. cc @dthree

@dthree
Copy link
Owner

dthree commented Jul 22, 2016

@zakhenry I believe this was fixed.

@dthree dthree closed this as completed Jul 22, 2016
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

No branches or pull requests

7 participants