diff --git a/pkg/gui/controllers/diffing_menu_action.go b/pkg/gui/controllers/diffing_menu_action.go index a53ad65e5..3ae5903d9 100644 --- a/pkg/gui/controllers/diffing_menu_action.go +++ b/pkg/gui/controllers/diffing_menu_action.go @@ -2,7 +2,6 @@ package controllers import ( "fmt" - "strings" "github.com/jesseduffield/lazygit/pkg/gui/modes/diffing" "github.com/jesseduffield/lazygit/pkg/gui/types" @@ -38,7 +37,7 @@ func (self *DiffingMenuAction) Call() error { Title: self.c.Tr.EnterRefName, FindSuggestionsFunc: self.c.Helpers().Suggestions.GetRefsSuggestionsFunc(), HandleConfirm: func(response string) error { - self.c.Modes().Diffing.Ref = strings.TrimSpace(response) + self.c.Modes().Diffing.Ref = response self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC}) return nil }, diff --git a/pkg/gui/controllers/filtering_menu_action.go b/pkg/gui/controllers/filtering_menu_action.go index 2ed072676..01a236f7a 100644 --- a/pkg/gui/controllers/filtering_menu_action.go +++ b/pkg/gui/controllers/filtering_menu_action.go @@ -2,7 +2,6 @@ package controllers import ( "fmt" - "strings" "github.com/jesseduffield/lazygit/pkg/gui/controllers/helpers" "github.com/jesseduffield/lazygit/pkg/gui/types" @@ -66,7 +65,7 @@ func (self *FilteringMenuAction) Call() error { FindSuggestionsFunc: self.c.Helpers().Suggestions.GetFilePathSuggestionsFunc(), Title: self.c.Tr.EnterFileName, HandleConfirm: func(response string) error { - return self.setFilteringPath(strings.TrimSpace(response)) + return self.setFilteringPath(response) }, }) @@ -82,7 +81,7 @@ func (self *FilteringMenuAction) Call() error { FindSuggestionsFunc: self.c.Helpers().Suggestions.GetAuthorsSuggestionsFunc(), Title: self.c.Tr.EnterAuthor, HandleConfirm: func(response string) error { - return self.setFilteringAuthor(strings.TrimSpace(response)) + return self.setFilteringAuthor(response) }, })