Fix bug in command-line yank code, and the test-runner that stopped the tests for it from failing

Review Request #106839 - Created Oct. 13, 2012 and submitted

Simon St James
First Kate patch, and first time using git and/ or ReviewBoard; apologies if I screw anything up ;)

While working on an unrelated thing to do with improving Kate's Vi mode tests, I managed to get a bunch of existing tests failing.  After some hours of investigation, I found out that it was due to the following:

a) There is a bug in the command-line yank code; and
b) the current test suite also contains a bug, that stops the bug in a) from being exposed by the tests ;)

This patch fixes both.

[You can see both a) and b) by executing one of the test-cases by hand.  Pick the one on line 645 of vimode_test.cpp: enter 


in a blank document, then switch to command-line mode and run:

2y a 2

then do


Observe that the actual result, when obtained manually, is very different from the one expected by the test, but when run in the test-runner, comes out fine!]

Commit Hook
Simon St James
Review request changed

Status: Closed (submitted)