File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
builtins/src/main/java/org/jline/builtins Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -1127,7 +1127,7 @@ private void moveToPreviousMatch(boolean spanFiles) throws IOException {
11271127 String newSource = sources .get (--sourceIdx ).getName ();
11281128 try {
11291129 openSource ();
1130- firstLineToDisplay = ( int )( long ) sources . get ( sourceIdx ). lines ( );
1130+ moveTo ( Integer . MAX_VALUE );
11311131 moveToPreviousMatch (true );
11321132 } catch (FileNotFoundException exp ) {
11331133 ssp .restore (newSource );
@@ -1166,12 +1166,9 @@ void moveForward(int lines) throws IOException {
11661166 display .clear ();
11671167 }
11681168 if (lines == Integer .MAX_VALUE ) {
1169- Long allLines = sources .get (sourceIdx ).lines ();
1170- if (allLines != null ) {
1171- firstLineToDisplay = (int )(long )allLines ;
1172- for (int l = 0 ; l < height - 1 ; l ++) {
1173- firstLineToDisplay = prevLine2display (firstLineToDisplay , dpCompiled ).getU ();
1174- }
1169+ moveTo (Integer .MAX_VALUE );
1170+ for (int l = 0 ; l < height - 1 ; l ++) {
1171+ firstLineToDisplay = prevLine2display (firstLineToDisplay , dpCompiled ).getU ();
11751172 }
11761173 }
11771174 while (--lines >= 0 ) {
You can’t perform that action at this time.
0 commit comments