Add comments to broken code
This commit is contained in:
parent
ad173d06a9
commit
cef7be6c25
|
@ -26,6 +26,7 @@ public class LispTerminal {
|
|||
private boolean isFinished;
|
||||
|
||||
public LispTerminal(IOSafeTerminal terminal, PipedOutputStream inputWriter, PipedInputStream outputReader) {
|
||||
// FIXME - add resize handler
|
||||
this.terminal = terminal;
|
||||
this.inputWriter = inputWriter;
|
||||
this.outputReader = outputReader;
|
||||
|
@ -139,8 +140,6 @@ public class LispTerminal {
|
|||
|
||||
terminal.setCursorPosition(newPosition);
|
||||
|
||||
if (distanceFromOrigin(newPosition) == inputLine.length())
|
||||
leadingEdge = terminal.getCursorPosition();
|
||||
}
|
||||
|
||||
private boolean isAtStartOfRow(TerminalPosition cursorPosition) {
|
||||
|
@ -166,6 +165,7 @@ public class LispTerminal {
|
|||
|
||||
TerminalPosition newPosition = terminal.getCursorPosition();
|
||||
|
||||
// FIXME - use distance from origin to set leading edge
|
||||
if (distanceFromOrigin(newPosition) == inputLine.length())
|
||||
leadingEdge = terminal.getCursorPosition();
|
||||
}
|
||||
|
@ -225,6 +225,10 @@ public class LispTerminal {
|
|||
terminal.putCharacter(' ');
|
||||
|
||||
retractCursor(cursorPosition);
|
||||
|
||||
// FIXME - use distance from origin to set leading edge
|
||||
if (distanceFromOrigin(leadingEdge) > inputLine.length())
|
||||
leadingEdge = terminal.getCursorPosition();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -240,6 +244,10 @@ public class LispTerminal {
|
|||
|
||||
terminal.putCharacter(' ');
|
||||
terminal.setCursorPosition(cursorPosition);
|
||||
|
||||
// FIXME - use distance from origin to set leading edge
|
||||
if (distanceFromOrigin(leadingEdge) > inputLine.length())
|
||||
leadingEdge = terminal.getCursorPosition();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -251,6 +259,8 @@ public class LispTerminal {
|
|||
+ inputLine.substring(distanceFromOrigin(cursorPosition), inputLine.length());
|
||||
inputLine = inputLine.substring(0, distanceFromOrigin(cursorPosition)) + remaining;
|
||||
|
||||
// FIXME - must have a way to push remainder on to a new line at the end of the buffer
|
||||
|
||||
for (char c : remaining.toCharArray())
|
||||
terminal.putCharacter(c);
|
||||
|
||||
|
|
Loading…
Reference in New Issue