ApplyToConfig writes the current settings values back to a config.
(cfg *config.Config)
| 70 | |
| 71 | // ApplyToConfig writes the current settings values back to a config. |
| 72 | func (s *SettingsOverlay) ApplyToConfig(cfg *config.Config) { |
| 73 | for _, item := range s.items { |
| 74 | switch item.Key { |
| 75 | case "worktree.setup": |
| 76 | cfg.Worktree.Setup = item.StringVal |
| 77 | case "onComplete.push": |
| 78 | cfg.OnComplete.Push = item.BoolVal |
| 79 | case "onComplete.createPR": |
| 80 | cfg.OnComplete.CreatePR = item.BoolVal |
| 81 | } |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | // MoveUp moves the selection up. |
| 86 | func (s *SettingsOverlay) MoveUp() { |
no outgoing calls