Files
textmate/Frameworks/editor
Allan Odgaard 69504292e5 Better job of moving caret/preserving selection for “toggle case”
Previously we would set a mark, mutate the buffer, and then restore selection based on how the mark was moved.

When a mutation was changing the buffer to its existing value (e.g. toggling case of a space character) then the buffer would effectively ignore the mutation, and the mark would not be properly updated, meaning for “toggle case of character” the caret would not be moved forward.

Additionally we previously always moved to the end of a mutation, even if it was done on a user selection. We now only move to the end if the user didn’t select anything (but ran the mutation on an implicitly selected unit, like a word). The “toggle case of word” action is affected by this.
2014-03-25 12:19:58 +07:00
..