Changeset View
Changeset View
Standalone View
Standalone View
src/TerminalDisplay.cpp
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | |||||
56 | #include <KJobWidgets> | 56 | #include <KJobWidgets> | ||
57 | #include <KMessageBox> | 57 | #include <KMessageBox> | ||
58 | #include <KMessageWidget> | 58 | #include <KMessageWidget> | ||
59 | #include <KIO/StatJob> | 59 | #include <KIO/StatJob> | ||
60 | 60 | | |||
61 | // Konsole | 61 | // Konsole | ||
62 | #include "Filter.h" | 62 | #include "Filter.h" | ||
63 | #include "konsoledebug.h" | 63 | #include "konsoledebug.h" | ||
64 | #include "konsole_wcwidth.h" | | |||
65 | #include "TerminalCharacterDecoder.h" | 64 | #include "TerminalCharacterDecoder.h" | ||
66 | #include "Screen.h" | 65 | #include "Screen.h" | ||
67 | #include "LineFont.h" | 66 | #include "LineFont.h" | ||
68 | #include "SessionController.h" | 67 | #include "SessionController.h" | ||
69 | #include "ExtendedCharTable.h" | 68 | #include "ExtendedCharTable.h" | ||
70 | #include "TerminalDisplayAccessible.h" | 69 | #include "TerminalDisplayAccessible.h" | ||
71 | #include "SessionManager.h" | 70 | #include "SessionManager.h" | ||
72 | #include "Session.h" | 71 | #include "Session.h" | ||
▲ Show 20 Lines • Show All 1866 Lines • ▼ Show 20 Line(s) | |||||
1939 | { | 1938 | { | ||
1940 | if (!isCursorOnDisplay()){ | 1939 | if (!isCursorOnDisplay()){ | ||
1941 | return; | 1940 | return; | ||
1942 | } | 1941 | } | ||
1943 | 1942 | | |||
1944 | const int cursorLocation = loc(cursorPosition().x(), cursorPosition().y()); | 1943 | const int cursorLocation = loc(cursorPosition().x(), cursorPosition().y()); | ||
1945 | Q_ASSERT(cursorLocation < _imageSize); | 1944 | Q_ASSERT(cursorLocation < _imageSize); | ||
1946 | 1945 | | |||
1947 | int charWidth = konsole_wcwidth(_image[cursorLocation].character); | 1946 | int charWidth = _image[cursorLocation].width(); | ||
1948 | QRect cursorRect = imageToWidget(QRect(cursorPosition(), QSize(charWidth, 1))); | 1947 | QRect cursorRect = imageToWidget(QRect(cursorPosition(), QSize(charWidth, 1))); | ||
1949 | update(cursorRect); | 1948 | update(cursorRect); | ||
1950 | } | 1949 | } | ||
1951 | 1950 | | |||
1952 | /* ------------------------------------------------------------------------- */ | 1951 | /* ------------------------------------------------------------------------- */ | ||
1953 | /* */ | 1952 | /* */ | ||
1954 | /* Geometry & Resizing */ | 1953 | /* Geometry & Resizing */ | ||
1955 | /* */ | 1954 | /* */ | ||
▲ Show 20 Lines • Show All 1437 Lines • ▼ Show 20 Line(s) | 3391 | default: | |||
3393 | break; | 3392 | break; | ||
3394 | } | 3393 | } | ||
3395 | 3394 | | |||
3396 | return QVariant(); | 3395 | return QVariant(); | ||
3397 | } | 3396 | } | ||
3398 | 3397 | | |||
3399 | QRect TerminalDisplay::preeditRect() const | 3398 | QRect TerminalDisplay::preeditRect() const | ||
3400 | { | 3399 | { | ||
3401 | const int preeditLength = string_width(_inputMethodData.preeditString); | 3400 | const int preeditLength = Character::stringWidth(_inputMethodData.preeditString); | ||
3402 | 3401 | | |||
3403 | if (preeditLength == 0) { | 3402 | if (preeditLength == 0) { | ||
3404 | return QRect(); | 3403 | return QRect(); | ||
3405 | } | 3404 | } | ||
3406 | const QRect stringRect(_contentRect.left() + _fontWidth * cursorPosition().x(), | 3405 | const QRect stringRect(_contentRect.left() + _fontWidth * cursorPosition().x(), | ||
3407 | _contentRect.top() + _fontHeight * cursorPosition().y(), | 3406 | _contentRect.top() + _fontHeight * cursorPosition().y(), | ||
3408 | _fontWidth * preeditLength, | 3407 | _fontWidth * preeditLength, | ||
3409 | _fontHeight); | 3408 | _fontHeight); | ||
▲ Show 20 Lines • Show All 520 Lines • Show Last 20 Lines |