0001-clear-InputLine-on-Key_Down.patch
src/uisupport/inputline.cpp | ||
---|---|---|
53 | 53 | |
54 | 54 |
addToHistory(text(), true); |
55 | 55 |
|
56 |
if(idx < history.count()) |
|
56 |
if(idx < history.count()) {
|
|
57 | 57 |
idx++; |
58 | ||
59 |
if(idx < history.count() || tempHistory.contains(idx)) // tempHistory might have an entry for idx == history.count() + 1 |
|
60 |
showHistoryEntry(); |
|
61 |
else |
|
62 |
resetLine(); // equals clear() in this case |
|
58 |
if(idx < history.count() || tempHistory.contains(idx)) // tempHistory might have an entry for idx == history.count() + 1 |
|
59 |
showHistoryEntry(); |
|
60 |
else |
|
61 |
resetLine(); // equals clear() in this case |
|
62 |
} else { |
|
63 |
resetLine(); // user pressed Key_Down on the most recent history line, so clear InputLine |
|
64 |
} |
|
63 | 65 | |
64 | 66 |
break; |
65 | 67 |
|
... | ... | |
129 | 131 |
void InputLine::resetLine() { |
130 | 132 |
// every time the InputLine is cleared we also reset history index |
131 | 133 |
idx = history.count(); |
134 |
tempHistory.remove(idx); |
|
132 | 135 |
clear(); |
133 | 136 |
} |
134 | 137 | |
135 |
- |