Commit 41785890 authored by hluk's avatar hluk Committed by hjk

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: default avatarhjk <hjk121@nokiamail.com>
parent a60cf5d0
......@@ -3174,6 +3174,10 @@ void FakeVimPlugin::test_macros()
KEYS("@x", "def" N X "abc");
KEYS("gg@x", "abc" N X "def");
data.doCommand("unmap <S-down>");
data.setText(" abc xyz>." N " def xyz>." N " ghi xyz>." N " jkl xyz>.");
KEYS("qq" "^wdf>j" "q", " abc ." N " def " X "xyz>." N " ghi xyz>." N " jkl xyz>.");
KEYS("2@q", " abc ." N " def ." N " ghi ." N " jkl " X "xyz>.");
}
void FakeVimPlugin::test_vim_qtcreator()
......
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment