mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 19:02:59 +00:00
actually replace tabs with space from qt_format_text() function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
eff31380ef
commit
c782725682
1 changed files with 4 additions and 2 deletions
|
@ -5968,8 +5968,10 @@ start_lengthVariant:
|
|||
int old_offset = offset;
|
||||
for (; offset < text.length(); offset++) {
|
||||
QChar chr = text.at(offset);
|
||||
// replace tabs with spaces for compatibility
|
||||
if (chr == QLatin1Char('\r') || (singleline && chr == QLatin1Char('\n'))) {
|
||||
// replace tabs with space for compatibility
|
||||
if (chr == QLatin1Char('\t')) {
|
||||
text[offset] = QLatin1Char(' ');
|
||||
} else if (chr == QLatin1Char('\r') || (singleline && chr == QLatin1Char('\n'))) {
|
||||
text[offset] = QLatin1Char(' ');
|
||||
} else if (chr == QLatin1Char('\n')) {
|
||||
text[offset] = QChar::LineSeparator;
|
||||
|
|
Loading…
Add table
Reference in a new issue