mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 21:05:48 +02:00
refactor to not have Match at the start of assert method names, because it reads better that way
This commit is contained in:
parent
c19f52255c
commit
aedfce2845
36 changed files with 208 additions and 208 deletions
|
@ -78,7 +78,7 @@ func (self *Input) Confirm() {
|
|||
|
||||
func (self *Input) ProceedWhenAsked(matcher *matcher) {
|
||||
self.assert.InConfirm()
|
||||
self.assert.MatchCurrentViewContent(matcher)
|
||||
self.assert.CurrentViewContent(matcher)
|
||||
self.Confirm()
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ func (self *Input) PreviousItem() {
|
|||
|
||||
func (self *Input) ContinueMerge() {
|
||||
self.PressKeys(self.keys.Universal.CreateRebaseOptionsMenu)
|
||||
self.assert.MatchSelectedLine(Contains("continue"))
|
||||
self.assert.SelectedLine(Contains("continue"))
|
||||
self.Confirm()
|
||||
}
|
||||
|
||||
|
@ -171,20 +171,20 @@ func (self *Input) NavigateToListItemContainingText(text string) {
|
|||
|
||||
selectedLineIdx := view.SelectedLineIdx()
|
||||
if selectedLineIdx == matchIndex {
|
||||
self.assert.MatchSelectedLine(Contains(text))
|
||||
self.assert.SelectedLine(Contains(text))
|
||||
return
|
||||
}
|
||||
if selectedLineIdx < matchIndex {
|
||||
for i := selectedLineIdx; i < matchIndex; i++ {
|
||||
self.NextItem()
|
||||
}
|
||||
self.assert.MatchSelectedLine(Contains(text))
|
||||
self.assert.SelectedLine(Contains(text))
|
||||
return
|
||||
} else {
|
||||
for i := selectedLineIdx; i > matchIndex; i-- {
|
||||
self.PreviousItem()
|
||||
}
|
||||
self.assert.MatchSelectedLine(Contains(text))
|
||||
self.assert.SelectedLine(Contains(text))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue