forked from qt-creator/qt-creator
FakeVim: Correctly save input for macro
Change-Id: I648d1ec763c8a49b6d3e1bb5fb13fe1af5ae2368 Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -968,17 +968,23 @@ public:
|
|||||||
QString toString() const
|
QString toString() const
|
||||||
{
|
{
|
||||||
QString key = vimKeyNames().key(m_key);
|
QString key = vimKeyNames().key(m_key);
|
||||||
|
bool namedKey = !key.isEmpty();
|
||||||
|
|
||||||
if (key.isEmpty()) {
|
if (!namedKey) {
|
||||||
if (m_xkey == '<')
|
if (m_xkey == '<')
|
||||||
key = _("<LT>");
|
key = _("<LT>");
|
||||||
else
|
else
|
||||||
key = QChar(m_xkey);
|
key = QChar(m_xkey);
|
||||||
} else {
|
}
|
||||||
if (isShift())
|
|
||||||
key.prepend(_("S-"));
|
bool shift = isShift();
|
||||||
if (isControl())
|
bool ctrl = isControl();
|
||||||
key.prepend(_("C-"));
|
if (shift)
|
||||||
|
key.prepend(_("S-"));
|
||||||
|
if (ctrl)
|
||||||
|
key.prepend(_("C-"));
|
||||||
|
|
||||||
|
if (namedKey || shift || ctrl) {
|
||||||
key.prepend(QLatin1Char('<'));
|
key.prepend(QLatin1Char('<'));
|
||||||
key.append(QLatin1Char('>'));
|
key.append(QLatin1Char('>'));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user