Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions src/__tests__/expected/selectAllBug.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
=== diff --git |===>a/src/choose.py b/src/choose.py
/-\ index d184f91.|===>.5d7f2f9 100755
\-/ --- a/src/choose.py
. +++ b/src/choose.py
. @@ -11,6 +11,7 @@ import curses
. import pickle
. import sys
. import os
. +import argparse
.
. import output
. import screenControl
. @@ -29,18 +30,16 @@ this error will go away)
. '''
.
.
. -def doProgram(stdscr, cursesAPI=None, lineObjs=None, flags=None):
. +def doProgram(stdscr, flags, cursesAPI=None, lineObjs=None):
. # curses and lineObjs get dependency injected for
. # our tests, so init these if they are not provided
. if not cursesAPI:
. cursesAPI = CursesAPI()
. if not lineObjs:
. lineObjs = getLineObjs()
. - if not flags:
. - flags = ScreenFlags.initFromArgs()
.
.
. ___________________________________________________________________________
=== [f|A] selection, [down|j|up|k|space|b] navigation, [enter] open, [x] quick
4 changes: 4 additions & 0 deletions src/__tests__/testScreen.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@
'input': 'gitAbbreviatedFiles.txt',
'withAttributes': True,
'inputs': ['f', 'j'],
}, {
'name': 'selectAllBug',
'input': 'gitLongDiff.txt',
'inputs': ['A'],
}]


Expand Down
2 changes: 1 addition & 1 deletion src/screenControl.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ def processDirty(self):
didClearLine = False
for index in self.dirtyIndexes:
y = miny + index + self.getScrollOffset()
if y >= miny or y < maxy:
if y >= miny and y < maxy:
didClearLine = True
self.clearLine(y)
self.lineObjs[index].output(self.colorPrinter)
Expand Down