[qwaq] Fix line formatting for the simple case

That is, known to be working for the simple case (no tabs, no horizontal
scroll).
This commit is contained in:
Bill Currie 2020-03-22 22:13:35 +09:00
parent 10adb116ef
commit 8694798943

View file

@ -483,11 +483,15 @@ formatLine (txtbuffer_t *buffer, unsigned linePtr, unsigned xpos,
c = ' ';
count = tabSize - (pos % tabSize);
}
while (length-- > 0 && count-- > 0) {
while (length > 0 && count-- > 0) {
*dst++ = col | c;
pos++;
length--;
}
}
while (c != '\n') {
c = getChar (buffer, ptr++);
}
col = ptr >= sels && ptr < sele ? cols : coln;
while (length-- > 0) {
*dst++ = col | ' ';