Changeset View
Changeset View
Standalone View
Standalone View
src/Screen.cpp
Show All 21 Lines | |||||
22 | 22 | | |||
23 | // Own | 23 | // Own | ||
24 | #include "Screen.h" | 24 | #include "Screen.h" | ||
25 | 25 | | |||
26 | // Qt | 26 | // Qt | ||
27 | #include <QTextStream> | 27 | #include <QTextStream> | ||
28 | 28 | | |||
29 | // Konsole | 29 | // Konsole | ||
30 | #include "konsole_wcwidth.h" | | |||
31 | #include "TerminalCharacterDecoder.h" | 30 | #include "TerminalCharacterDecoder.h" | ||
32 | #include "History.h" | 31 | #include "History.h" | ||
33 | #include "ExtendedCharTable.h" | 32 | #include "ExtendedCharTable.h" | ||
34 | 33 | | |||
35 | using namespace Konsole; | 34 | using namespace Konsole; | ||
36 | 35 | | |||
37 | //Macro to convert x,y position on screen to position within an image. | 36 | //Macro to convert x,y position on screen to position within an image. | ||
38 | // | 37 | // | ||
▲ Show 20 Lines • Show All 647 Lines • ▼ Show 20 Line(s) | |||||
686 | 685 | | |||
687 | void Screen::displayCharacter(uint c) | 686 | void Screen::displayCharacter(uint c) | ||
688 | { | 687 | { | ||
689 | // Note that VT100 does wrapping BEFORE putting the character. | 688 | // Note that VT100 does wrapping BEFORE putting the character. | ||
690 | // This has impact on the assumption of valid cursor positions. | 689 | // This has impact on the assumption of valid cursor positions. | ||
691 | // We indicate the fact that a newline has to be triggered by | 690 | // We indicate the fact that a newline has to be triggered by | ||
692 | // putting the cursor one right to the last column of the screen. | 691 | // putting the cursor one right to the last column of the screen. | ||
693 | 692 | | |||
694 | int w = konsole_wcwidth(c); | 693 | int w = Character::width(c); | ||
695 | 694 | | |||
696 | if (w < 0) { | 695 | if (w < 0) { | ||
697 | // Non-printable character | 696 | // Non-printable character | ||
698 | return; | 697 | return; | ||
699 | } else if (w == 0) { | 698 | } else if (w == 0) { | ||
700 | const QChar::Category category = QChar::category(c); | 699 | const QChar::Category category = QChar::category(c); | ||
701 | if (category != QChar::Mark_NonSpacing && category != QChar::Letter_Other) { | 700 | if (category != QChar::Mark_NonSpacing && category != QChar::Letter_Other) { | ||
702 | return; | 701 | return; | ||
▲ Show 20 Lines • Show All 819 Lines • Show Last 20 Lines |