Commit 9e4dabc8 authored by hluk's avatar hluk Committed by hjk
Browse files

FakeVim: Dot command works for letter case commands in visual mode



Change-Id: I303c464c0ca2fb01f4a951d3fe7b6796f31d0ab2
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent a1072b10
......@@ -1902,6 +1902,19 @@ void FakeVimPlugin::test_vim_letter_case()
KEYS("2gUU", " " X "ABC" N "DEF");
KEYS("u", " " X "abc" N "def");
KEYS("<c-r>", " " X "ABC" N "DEF");
// undo, redo and dot command
data.setText(" abcde" N " fgh" N " ijk");
KEYS("3l" "<C-V>2l2j" "U", " a" X "BCDe" N " fGH" N " iJK");
KEYS("u", " a" X "bcde" N " fgh" N " ijk");
KEYS("<C-R>", " a" X "BCDe" N " fGH" N " iJK");
KEYS("u", " a" X "bcde" N " fgh" N " ijk");
KEYS("h.", " " X "ABCde" N " FGH" N " IJK");
KEYS("u", " " X "abcde" N " fgh" N " ijk");
KEYS("h.", " " X " ABcde" N " FGh" N " IJk");
KEYS("u", " " X " abcde" N " fgh" N " ijk");
KEYS("j.", " abcde" N " " X " FGh" N " IJk");
KEYS("u", " abcde" N " " X " fgh" N " ijk");
}
void FakeVimPlugin::test_vim_code_autoindent()
......
......@@ -4219,7 +4219,9 @@ bool FakeVimHandler::Private::handleNoSubMode(const Input &input)
g.submode = CapitalZSubMode;
} else if ((input.is('~') || input.is('u') || input.is('U'))) {
g.movetype = MoveExclusive;
pushUndoState();
if (isVisualMode()) {
setDotCommand(visualDotCommand() + QString::number(count()) + input.raw());
if (isVisualLineMode())
g.rangemode = RangeLineMode;
else if (isVisualBlockMode())
......@@ -4233,7 +4235,6 @@ bool FakeVimHandler::Private::handleNoSubMode(const Input &input)
g.submode = UpCaseSubMode;
finishMovement();
} else if (g.gflag || (input.is('~') && hasConfig(ConfigTildeOp))) {
pushUndoState();
if (atEndOfLine())
moveLeft();
setAnchor();
......
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