revisions of example 'cl-repl'

This commit is contained in:
pls.153 2022-12-29 14:32:17 +01:00
parent d106f1f5d4
commit 43df41e8b9
2 changed files with 15 additions and 4 deletions

View file

@ -36,11 +36,13 @@ public:
skipAutoFullStop = true;
} else {
if (size == 1) {
static QChar exChar;
bool changed = true;
const int code = s.at(0).unicode();
switch (code) {
// prevent auto full stop after double space
case '.':
if (skipAutoFullStop) { // prevent auto full stop after double space
if (skipAutoFullStop && (exChar == ' ')) {
s = " ";
} else {
changed = false;
@ -84,6 +86,7 @@ public:
if (changed) {
input->setCommitString(s);
}
exChar = s.at(0);
} else if (size == 2) {
bool changed = true;
s = s.trimmed();