change code for hisitory size

This commit is contained in:
Jarred Li
2012-04-15 12:39:50 +08:00
parent a150e1ba57
commit a5932f649f

View File

@@ -132,7 +132,7 @@ public abstract class JLineShell extends AbstractShell implements CommandMarker,
// reader.setDebug(new PrintWriter(new FileWriter("writer.debug", true)));
openFileLogIfPossible();
this.reader.getHistory().setMaxSize(this.historySize);
// Try to build previous command history from the project's log
String[] filteredLogEntries = filterLogEntry();
for (String logEntry : filteredLogEntries) {
@@ -652,7 +652,6 @@ public abstract class JLineShell extends AbstractShell implements CommandMarker,
*/
public void setHistorySize(int historySize) {
this.historySize = historySize;
this.reader.getHistory().setMaxSize(this.historySize);
}
}