- fix: caret dispears when at '\t' under Windows 7

This commit is contained in:
Roy Qu 2022-01-12 22:21:40 +08:00
parent eefb65bcb4
commit 19fc3302ed
2 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@ Red Panda C++ Version 0.13.2
- enhancement: redirect stdio to a file while debugging ( must use gdb server mode to debug)
- fix: parser can't correctly handle variable definitions that don't have spaces like 'int*x';
- fix: parser can't correctly handle function parameters like 'int *x'
- fix: caret dispears when at '\t' under Windows 7
Red Panda C++ Version 0.13.1
- enhancement: suppoort localization info in project templates

View File

@ -1250,7 +1250,7 @@ BufferCoord SynEdit::getPreviousLeftBrace(int x, int y)
int SynEdit::charColumns(QChar ch) const
{
if (ch == ' ')
if (ch == ' ' || ch == '\t')
return 1;
//return std::ceil((int)(fontMetrics().horizontalAdvance(ch) * dpiFactor()) / (double)mCharWidth);
return std::ceil((int)(fontMetrics().horizontalAdvance(ch)) / (double)mCharWidth);