1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-05-27 23:08:02 +02:00
This commit is contained in:
Jesse Duffield 2022-12-28 10:29:32 +11:00
parent 47de61b57c
commit f495945b87

View File

@ -212,7 +212,7 @@ func (self *View) LineCount(expectedCount int) *View {
// if the view has a single blank line (often the case) we want to treat that as having no lines
if len(lines) == 1 && expectedCount == 1 {
actual := strings.TrimSpace(self.getView().Buffer())
return actual == "", fmt.Sprintf("unexpected number of lines in view. Expected %d, got 0", expectedCount)
return actual != "", "unexpected number of lines in view. Expected 1, got 0"
}
return len(lines) == expectedCount, fmt.Sprintf("unexpected number of lines in view. Expected %d, got %d", expectedCount, len(lines))