mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
[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:
parent
10adb116ef
commit
8694798943
1 changed files with 5 additions and 1 deletions
|
@ -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 | ' ';
|
||||
|
|
Loading…
Reference in a new issue