FakeVim: Escape '>' character in mappings

On some keyboards, '>' character can be produced using Shift key. But
recorded macro shouldn't contain '<S->>', which cannot be properly
parsed, instead it will be '<S-<GT>>' (as '<LT>' for '<').

Change-Id: Iac3759029b6ff8c9e690c4728e35048c0b6046f9
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
hluk
2013-08-20 14:37:15 +02:00
committed by hjk
parent a60cf5d0fa
commit 41785890d6
2 changed files with 7 additions and 0 deletions

View File

@@ -725,6 +725,7 @@ static const QMap<QString, int> &vimKeyNames()
k.insert(_("RIGHT"), Key_Right);
k.insert(_("LT"), Key_Less);
k.insert(_("GT"), Key_Greater);
k.insert(_("F1"), Key_F1);
k.insert(_("F2"), Key_F2);
@@ -1007,6 +1008,8 @@ public:
if (!namedKey) {
if (m_xkey == '<')
key = _("<LT>");
else if (m_xkey == '>')
key = _("<GT>");
else
key = QChar(m_xkey);
}