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

Tab completion #25

Merged
merged 1 commit into from
Dec 15, 2014
Merged

Tab completion #25

merged 1 commit into from
Dec 15, 2014

Conversation

garcg
Copy link
Contributor

@garcg garcg commented Dec 15, 2014

Completion of callsigns and commands with the tab key.

Repeatedly pressing tab will cycle through the current matches for the aircraft or command. In case of an aircraft, it is highlighted on the map/sidebar accordingly. Pressing shift+tab cycles backward.

Currently an incomplete callsign/command is valid as long as it is unambiguous. This PR does not change that, it just adds additional completion and cycling through ambiguous matches.

"clear",
"descend",
COMMANDS: [
"turn",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The only actual change to aircraft.js is moving COMMANDS outside runCommand so it is accessible from input.js.
The diff shows a lot changes, but it is just that.

@psycho202
Copy link
Contributor

Is the tab completing of commands necessary? A short input like "n641mf h 0" is already enough to change heading to 0°. Almost all other commands are possible like that too.

@boreq
Copy link

boreq commented Dec 15, 2014

I totally support the idea of tab completion, especially of the call signs.

@garcg
Copy link
Contributor Author

garcg commented Dec 15, 2014

The short commands still work. "n641mf h 0" is still valid with this PR.

I don't think completing commands is absolutely necessary, just a bit nicer. But perhaps it is a personal thing, out of habit.

Now, completing and cycling through call signs, I believe that is an improvement.

@psycho202
Copy link
Contributor

Yeah, the tabbing through callsigns is a major advantage.
With the current atc kdbg airport spawn rates, it's a lot easier that way., instead of having to scroll through the list, which also kinda bugs out whenever it needs to scroll.

zlsa added a commit that referenced this pull request Dec 15, 2014
@zlsa zlsa merged commit 4562969 into zlsa:gh-pages Dec 15, 2014
@zlsa
Copy link
Owner

zlsa commented Dec 15, 2014

Works very well, thanks @garcg!

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.

4 participants