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

Remove yaml fork #2833

Closed
jesseduffield opened this issue Jul 26, 2023 · 1 comment
Closed

Remove yaml fork #2833

jesseduffield opened this issue Jul 26, 2023 · 1 comment
Labels
maintenance For refactorings, CI changes, tests, version bumping, etc

Comments

@jesseduffield
Copy link
Owner

jesseduffield commented Jul 26, 2023

We have a yaml fork which specially handles null values when merging yaml files. This allows us to set a keybinding to null and have it unmapped, rather than being set to the default.

I want to migrate users' configs to instead use <disabled> in place of null so that we get the same merging behaviour without needing to use my fork.

We can test the behaviour with this integration test:

// pkg/integration/tests/misc/null_keybinding.go
package misc

import (
	"github.com/jesseduffield/lazygit/pkg/config"
	. "github.com/jesseduffield/lazygit/pkg/integration/components"
)

var NullKeybinding = NewIntegrationTest(NewIntegrationTestArgs{
	Description:  "Confirms You can set keybindings to blank to disable them",
	ExtraCmdArgs: []string{},
	Skip:         false,
	SetupConfig: func(config *config.AppConfig) {
		config.UserConfig.Keybinding.Universal.ScrollRight = "<disabled>"
		config.UserConfig.Keybinding.Universal.NextTab = "H"
	},
	SetupRepo: func(shell *Shell) {},
	Run: func(t *TestDriver, keys config.KeybindingConfig) {
		t.Views().Files().
			IsFocused().
			Press("H")

		// NOTE: by the time we add this test, we might have inserted a 'worktrees' tab between the files and submodules tab, in which case we'll need to verify here that the worktrees view is focused
		t.Views().Submodules().IsFocused()
	},
})
@jesseduffield jesseduffield added the maintenance For refactorings, CI changes, tests, version bumping, etc label Jul 26, 2023
karimkhaleel added a commit to karimkhaleel/lazygit that referenced this issue Oct 9, 2023
Treat <disabled> setting as equivalent to "null"
in keybindings user configs.
karimkhaleel added a commit to karimkhaleel/lazygit that referenced this issue Oct 9, 2023
Treat <disabled> setting as equivalent to "null"
in keybindings user configs.
karimkhaleel added a commit to karimkhaleel/lazygit that referenced this issue Oct 9, 2023
Treat <disabled> setting as equivalent to "null"
in keybindings user configs.
@stefanhaller
Copy link
Collaborator

Fixed by #3459.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance For refactorings, CI changes, tests, version bumping, etc
Projects
None yet
Development

No branches or pull requests

2 participants