Commit a858cfef authored by Simon St James's avatar Simon St James

Ensure that vib and vab select the bracket text object.

parent f6a8a8de
......@@ -486,6 +486,13 @@ void ViModeTest::NormalModeMotionsTest() {
DoTest( "foo \"bar baz ('first', 'second' or 'third')\"",
"8w2lcib",
"foo \"bar baz ()\"");
// Quick test that bracket object works in visual mode.
DoTest( "foo \"bar baz ('first', 'second' or 'third')\"",
"8w2lvibd",
"foo \"bar baz ()\"");
DoTest( "foo \"bar baz ('first', 'second' or 'third')\"",
"8w2lvabd",
"foo \"bar baz \"");
DoTest( "foo \"bar baz ('first', 'second' or 'third')\"",
"8w2lca)",
......
......@@ -395,8 +395,8 @@ void KateViVisualMode::initializeCommands()
ADDMOTION("a\"", textObjectAQuoteDouble, 0 );
ADDMOTION("i'", textObjectInnerQuoteSingle, 0 );
ADDMOTION("a'", textObjectAQuoteSingle, 0 );
ADDMOTION("i[()]", textObjectInnerParen, REGEX_PATTERN );
ADDMOTION("a[()]", textObjectAParen, REGEX_PATTERN );
ADDMOTION("i[()b]", textObjectInnerParen, REGEX_PATTERN );
ADDMOTION("a[()b]", textObjectAParen, REGEX_PATTERN );
ADDMOTION("i[{}B]", textObjectInnerCurlyBracket, REGEX_PATTERN | IS_NOT_LINEWISE);
ADDMOTION("a[{}B]", textObjectACurlyBracket, REGEX_PATTERN | IS_NOT_LINEWISE);
ADDMOTION("i[\\[\\]]", textObjectInnerBracket, REGEX_PATTERN );
......
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