Changeset 118
- Timestamp:
- 10/13/02 14:02:55 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/j/Shell.java
r112 r118 3 3 * 4 4 * Copyright (C) 1998-2002 Peter Graves 5 * $Id: Shell.java,v 1. 6 2002-10-12 00:06:39piso Exp $5 * $Id: Shell.java,v 1.7 2002-10-13 14:02:55 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 376 376 } 377 377 378 protected void enter(final String s) 378 private void enter() 379 { 380 if (!checkProcess()) 381 return; 382 final Editor editor = Editor.currentEditor(); 383 final Line dotLine = editor.getDotLine(); 384 if (posEndOfOutput == null) { 385 // Ignore input before first prompt is displayed. 386 dotLine.setText(""); 387 return; 388 } 389 if (posEndOfOutput.getLine() == dotLine) { 390 if (posEndOfOutput.getOffset() < dotLine.length()) 391 input = dotLine.getText().substring(posEndOfOutput.getOffset()); 392 else 393 input = ""; 394 } else { 395 // We're not at the end of the buffer. 396 input = stripPrompt(dotLine.getText()); 397 } 398 enter(input); 399 } 400 401 private void enter(final String s) 379 402 { 380 403 if (s.length() != 0) { … … 441 464 Log.error(e); 442 465 } 443 }444 445 private void enter()446 {447 if (!checkProcess())448 return;449 final Editor editor = Editor.currentEditor();450 final Line dotLine = editor.getDotLine();451 if (posEndOfOutput == null) {452 // Ignore input before first prompt is displayed.453 dotLine.setText("");454 return;455 }456 if (posEndOfOutput.getLine() == dotLine) {457 if (posEndOfOutput.getOffset() < dotLine.length())458 input = dotLine.getText().substring(posEndOfOutput.getOffset());459 else460 input = "";461 } else {462 // We're not at the end of the buffer.463 input = stripPrompt(dotLine.getText());464 }465 enter(input);466 466 } 467 467
Note: See TracChangeset
for help on using the changeset viewer.