With the inner curly bracket text object, try to leave the closing bracket on its own line, as with vim

Review Request #106847 - Created Oct. 14, 2012 and submitted

Simon St James
When doing a ciw/ diw or suchlike, vim tries to leave the closing bracket on its own line if it was on a different line to the opening bracket originally, whereas Kate currently just deletes all characters between them, ending up with "{}".

This patch emulates the vim way of doing things, and also fixes a logic flaw in innerRange(...) which this fix exposed.  Also fixes another bug in Kate's vim mode where doing a diw on


had no effect.
New tests added; no old tests broken.
Simon St James
Simon St James
Simon St James
Commit Hook
This review has been submitted with commit 3c186cab106018da661cb7635908399b73a1a83d by Erlend Hamberg to branch master.
Simon St James
Review request changed

Status: Closed (submitted)

Erlend Hamberg
Thanks for these patches! Patches like these makes a maintainer really happy. :-)

I looked over and applied all four patches – I think I applied them all without changes. This was really neat stuff, and it's good to see people including tests without me having to ask. ;-)

The test-runner bug was a really good catch. Thanks again!