Skip to content

Commit

Permalink
fixed vttest case 1
Browse files Browse the repository at this point in the history
  • Loading branch information
subhra74 committed Jun 13, 2020
1 parent 749d1f8 commit 1d69bc5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.jediterm.terminal.*;
import com.jediterm.terminal.emulator.mouse.MouseFormat;
import com.jediterm.terminal.emulator.mouse.MouseMode;
import com.jediterm.terminal.model.JediTerminal;
import com.jediterm.terminal.util.CharUtils;

import muon.terminal.Ascii;
Expand Down Expand Up @@ -769,13 +770,28 @@ private boolean cursorBackward(ControlSequence args) {
return true;
}

// private boolean setScrollingRegion(ControlSequence args) {
// final int top = args.getArg(0, 1);
// final int bottom = args.getArg(1, myTerminal.getTerminalHeight());
//
// myTerminal.setScrollingRegion(top, bottom);
//
// return true;
// }

private boolean setScrollingRegion(ControlSequence args) {
final int top = args.getArg(0, 1);
final int bottom = args.getArg(1, myTerminal.getTerminalHeight());

myTerminal.setScrollingRegion(top, bottom);

return true;
final int top = args.getArg(0, 1);
int bottom;
if (args.getCount() > 1) {
bottom = args.getArg(1, myTerminal.getTerminalHeight()) + 1;
} else {
bottom = myTerminal.getTerminalHeight();
}
// int bottom = args.getArg(1, myTerminal.getTerminalHeight());

myTerminal.setScrollingRegion(top, bottom);

return true;
}

private boolean scrollUp(ControlSequence args) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,12 @@ public void eraseInDisplay(final int arg) {
myTerminalTextBuffer.eraseCharacters(0, myCursorX + 1, myCursorY - 1);

beginY = 0;
endY = myCursorY - 1;
if(myCursorY-1>=1) {
endY = myCursorY - 2;
}else {
endY = myCursorY - 1;
}

break;
case 2:
beginY = 0;
Expand Down

0 comments on commit 1d69bc5

Please sign in to comment.