mirror of
				https://github.com/jesseduffield/lazygit.git
				synced 2025-10-30 23:57:43 +02:00 
			
		
		
		
	Add a menu item and keybinding to } to increase the context size
				
					
				
			This commit is contained in:
		| @@ -154,6 +154,7 @@ keybinding: | ||||
|     appendNewline: '<a-enter>' | ||||
|     extrasMenu: '@' | ||||
|     toggleWhitespaceInDiffView: '<c-w>' | ||||
|     increaseContextInDiffView: '}' | ||||
|   status: | ||||
|     checkForUpdate: 'u' | ||||
|     recentRepos: '<enter>' | ||||
|   | ||||
| @@ -177,6 +177,7 @@ type KeybindingUniversalConfig struct { | ||||
| 	AppendNewline                string   `yaml:"appendNewline"` | ||||
| 	ExtrasMenu                   string   `yaml:"extrasMenu"` | ||||
| 	ToggleWhitespaceInDiffView   string   `yaml:"toggleWhitespaceInDiffView"` | ||||
| 	IncreaseContextInDiffView    string   `yaml:"increaseContextInDiffView"` | ||||
| } | ||||
|  | ||||
| type KeybindingStatusConfig struct { | ||||
| @@ -438,6 +439,7 @@ func GetDefaultConfig() *UserConfig { | ||||
| 				AppendNewline:                "<a-enter>", | ||||
| 				ExtrasMenu:                   "@", | ||||
| 				ToggleWhitespaceInDiffView:   "<c-w>", | ||||
| 				IncreaseContextInDiffView:    "}", | ||||
| 			}, | ||||
| 			Status: KeybindingStatusConfig{ | ||||
| 				CheckForUpdate:      "u", | ||||
|   | ||||
| @@ -1770,6 +1770,12 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { | ||||
| 			Handler:     gui.toggleWhitespaceInDiffView, | ||||
| 			Description: gui.Tr.ToggleWhitespaceInDiffView, | ||||
| 		}, | ||||
| 		{ | ||||
| 			ViewName:    "", | ||||
| 			Key:         gui.getKey(config.Universal.IncreaseContextInDiffView), | ||||
| 			Handler:     gui.IncreaseContextInDiffView, | ||||
| 			Description: gui.Tr.IncreaseContextInDiffView, | ||||
| 		}, | ||||
| 		{ | ||||
| 			ViewName: "extras", | ||||
| 			Key:      gocui.MouseWheelUp, | ||||
|   | ||||
| @@ -427,6 +427,7 @@ type TranslationSet struct { | ||||
| 	ToggleWhitespaceInDiffView          string | ||||
| 	IgnoringWhitespaceInDiffView        string | ||||
| 	ShowingWhitespaceInDiffView         string | ||||
| 	IncreaseContextInDiffView           string | ||||
| 	CreatePullRequestOptions            string | ||||
| 	LcCreatePullRequestOptions          string | ||||
| 	LcDefaultBranch                     string | ||||
| @@ -967,6 +968,7 @@ func englishTranslationSet() TranslationSet { | ||||
| 		ToggleWhitespaceInDiffView:          "Toggle whether or not whitespace changes are shown in the diff view", | ||||
| 		IgnoringWhitespaceInDiffView:        "Whitespace will be ignored in the diff view", | ||||
| 		ShowingWhitespaceInDiffView:         "Whitespace will be shown in the diff view", | ||||
| 		IncreaseContextInDiffView:           "Increase the size of the context shown around changes in the diff view", | ||||
| 		CreatePullRequest:                   "Create pull request", | ||||
| 		CreatePullRequestOptions:            "Create pull request options", | ||||
| 		LcCreatePullRequestOptions:          "create pull request options", | ||||
|   | ||||
		Reference in New Issue
	
	Block a user