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

Command History #15

Merged
merged 2 commits into from
Dec 10, 2012
Merged

Command History #15

merged 2 commits into from
Dec 10, 2012

Conversation

jarrodrobins
Copy link
Contributor

Pressing up and down on the keyboard will move through the user's command history like it does on a standard command line.

@jarrodrobins
Copy link
Contributor Author

Actually, I got motivated and did it myself! Hope it's up to scratch, it seems to work!

@@ -276,6 +276,9 @@
var header = document.querySelector("header");
var headerHeight = header.offsetHeight;

var previousCommands = new Array();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[]

}
// now set the input's text to the previous command
// in the list.
input.value = previousCommand;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, this is awesome! After this line, could you please use something like this to set the cursor at the end of the text? (It's not happening for me in Chrome, otherwise.)

@haileys
Copy link
Collaborator

haileys commented Dec 10, 2012

This works pretty well, thanks!

haileys pushed a commit that referenced this pull request Dec 10, 2012
@haileys haileys merged commit 7f3f18c into BetterErrors:master Dec 10, 2012
@haileys haileys mentioned this pull request Dec 10, 2012
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 this pull request may close these issues.

3 participants