Revision 58abddc...

Go back to digest for 11th August 2013

Bug Fixes in KDE Base

Simon Paul St James committed changes in [kate] /:

A rather bigger commit than I would have liked :/


a) Tighten up textObjectAWord considerably, and make it behave more like Vim's, including all of Vim's rather weird corner bases that I can uncover. In the process of doing this, I fell foul of some ambiguities in e.g. findPrevWordEnd etc, and so:

b) Have findPrevWordEnd etc return an invalid cursor if they can't find what we're asking them for. This reduces some ambiguities, such as: if findPrevWordEnd returns Cursor(0, 0), does it mean that the previous word is a single character at the beginning of the document, or that there is no previous word at all? Updated all call sites, and added regression tests for each one.

c) Added textObjectAWORD and textObjectInnerWORD. The latter is not as obsessively Vim-ish as the former.

d) Fix some debug info with the "run command with motion" stuff which printed out an incorrect range.

e) Made the special-casing of "w" and "W" inside the "run command with motion" part more specific: we're looking for *precisely* the "w" and "W" motions, not just a motion which ends in "w" or "W" (which includes the new "aw" and "aW").

There's some duplication between textObjectAWORD and textObjectAWord which I hope to remove.

File Changes

Modified 6 files
  •   tests/vimode_test.cpp
  •   tests/vimode_test.h
  •   part/vimode/kateviinsertmode.cpp
  •   part/vimode/katevimodebase.cpp
  •   part/vimode/katevinormalmode.cpp
  •   part/vimode/katevireplacemode.cpp
6 files changed in total