Skip to content

Conversation

@jesseduffield
Copy link
Owner

@jesseduffield jesseduffield commented Dec 30, 2022

  • PR Description

Adding a fun little easter egg.

I'm precommitting to not improving this easter egg at all; this was just a little holiday stint as a break from integration test migrations.

  • Please check if the PR fulfills these requirements
  • Cheatsheets are up-to-date (run go run scripts/cheatsheet/main.go generate)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • Docs (specifically docs/Config.md) have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

@jesseduffield jesseduffield changed the title add snake game Add easter egg Dec 30, 2022
@jesseduffield jesseduffield force-pushed the snake branch 4 times, most recently from 528c034 to cd824d2 Compare December 30, 2022 01:10
}

return (binding.Description != "" || binding.Alternative != "")
return (binding.Description != "" || binding.Alternative != "") && binding.Key != nil
Copy link
Owner Author

Choose a reason for hiding this comment

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

if a keybinding has no key assigned, we don't want to include it in the cheatsheet

{
ViewName: "files",
Description: "stage file",
Key: 'a',
Copy link
Owner Author

Choose a reason for hiding this comment

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

the existing tests didn't specify a key so they all broke. Because I'm lazy I'm just using key 'a' everywhere to get the passing again


// moves given context's view to the top of the window and returns
// true if the view was not already on top.
func (gui *Gui) moveToTopOfWindow(context types.Context) bool {
Copy link
Owner Author

Choose a reason for hiding this comment

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

appeasing the linter because the returned boolean is never used

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.

2 participants