if(idx < history.count()) {
idx++;
if(idx < history.count() || tempHistory.contains(idx)) // tempHistory might have an entry for idx == history.count() + 1
if(idx < history.count()) {
idx++;
if(idx < history.count() || tempHistory.contains(idx)) // tempHistory might have an entry for idx == history.count() + 1
if(history.isEmpty() || text != history[idx - (int)(idx == history.count())]) {
// if an entry of the history is changed, we remember it and show it again at this
// position until a line was actually sent
if(history.isEmpty() || text != history[idx - (int)(idx == history.count())]) {
// if an entry of the history is changed, we remember it and show it again at this
// position until a line was actually sent
QString lineSep;
foreach(QString seperator, lineSeperators) {
if(newText.contains(seperator)) {
QString lineSep;
foreach(QString seperator, lineSeperators) {
if(newText.contains(seperator)) {
if(newText.contains(lineSep)) {
clear();
QString line = newText.section(lineSep, 0, 0);
if(newText.contains(lineSep)) {
clear();
QString line = newText.section(lineSep, 0, 0);