Skip to content

Commit 95e5ed6

Browse files
committed
Remove TrimSpace calls that are no longer needed
The prompt code takes care of this now.
1 parent 7c126cd commit 95e5ed6

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

pkg/gui/controllers/diffing_menu_action.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package controllers
22

33
import (
44
"fmt"
5-
"strings"
65

76
"github.com/jesseduffield/lazygit/pkg/gui/modes/diffing"
87
"github.com/jesseduffield/lazygit/pkg/gui/types"
@@ -38,7 +37,7 @@ func (self *DiffingMenuAction) Call() error {
3837
Title: self.c.Tr.EnterRefName,
3938
FindSuggestionsFunc: self.c.Helpers().Suggestions.GetRefsSuggestionsFunc(),
4039
HandleConfirm: func(response string) error {
41-
self.c.Modes().Diffing.Ref = strings.TrimSpace(response)
40+
self.c.Modes().Diffing.Ref = response
4241
self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC})
4342
return nil
4443
},

pkg/gui/controllers/filtering_menu_action.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package controllers
22

33
import (
44
"fmt"
5-
"strings"
65

76
"github.com/jesseduffield/lazygit/pkg/gui/controllers/helpers"
87
"github.com/jesseduffield/lazygit/pkg/gui/types"
@@ -66,7 +65,7 @@ func (self *FilteringMenuAction) Call() error {
6665
FindSuggestionsFunc: self.c.Helpers().Suggestions.GetFilePathSuggestionsFunc(),
6766
Title: self.c.Tr.EnterFileName,
6867
HandleConfirm: func(response string) error {
69-
return self.setFilteringPath(strings.TrimSpace(response))
68+
return self.setFilteringPath(response)
7069
},
7170
})
7271

@@ -82,7 +81,7 @@ func (self *FilteringMenuAction) Call() error {
8281
FindSuggestionsFunc: self.c.Helpers().Suggestions.GetAuthorsSuggestionsFunc(),
8382
Title: self.c.Tr.EnterAuthor,
8483
HandleConfirm: func(response string) error {
85-
return self.setFilteringAuthor(strings.TrimSpace(response))
84+
return self.setFilteringAuthor(response)
8685
},
8786
})
8887

0 commit comments

Comments
 (0)