vrapper/vrapper — pull request #490 by solde9 (2014-08-20 04:08:25+00:00)
Title: fix #448: } motion behaves differently in visual mode

I traced the problem in the issue #448 to this method in `ImprovedParagraphProvider` in the improved paragraph plugin:

@Override
protected State visualModeBindings() {
return new VisualMotionState(Motion2VMC.CHARWISE, ImprovedParagraphMotion.PARAGRAPH_MOTIONS);
}

Changing `Motion2VMC.CHARWISE` for `Motion2VMC.LINEWISE` seems to fix the problem. It makes sense to me since the paragraph motion sounds more like a linewise motion.

I am working on a test but, for some reason I cannot make it fail:

@Test
public void testParagrapForwardMotionLineWise() throws CommandExecutionException {
Motion oneParagraphForward = ImprovedParagraphMotion.FORWARD;
adaptor.changeMode(LinewiseVisualMode.NAME);
assertEquals(LinewiseVisualMode.NAME, adaptor.getCurrentModeName());
checkMotion(oneParagraphForward,
"",'1',"\n"+
"\n"+
"2\n"+
"\n"+
"3\n",

"1\n",
'\n',
"2\n"+
"\n"+
"3\n"
);
reloadEditorAdaptor();
}