We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 871bb65 commit 2848962Copy full SHA for 2848962
source/textline/history.d
@@ -37,8 +37,8 @@ class History
37
void loadHistoryFile()
38
{
39
auto fname = environment.get("HOME") ~ "/.komando_hist";
40
- historyLength = 1;
41
history[0] = content;
+ historyLength = 1;
42
if (!fname.exists)
43
44
historyFile = File( fname, "w");
@@ -52,7 +52,7 @@ class History
52
foreach(line ; historyFile.byLine)
53
54
if (historyLength > maxHistoryLength-1) break;
55
- history[historyLength++] = line[];
+ history[historyLength++] = line[].dup;
56
if (isDebugOn) debugFile.writeln(history[historyLength-1]);
57
}
58
0 commit comments