Non-local drags from TextMate now include NSDragOperationGeneric
Introduce range_t::color field for somewhat arbitrary use

Also do a better job of preserving the “unanchored” property of a range.
Set “color” to true if range is untouched by ‘extend_if_empty’
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.
Do not restore project state for projects with no documents

The state being restored here would be file browser state, which might confuse the user if they are opening a folder via “mate” and then get a file browser restored for that project folder that show another location than the actual folder they open.

The reason we ignore the state when loading, rather than not saving it in the first place, is that by saving the state we make the folder show up in File → Open Favorites…
Include numbers as a group for sub-word movement
Simplify sub-word movement tests