These normally require that the sender is an NSIndexSet or has one as its represented object, but with this commit, they will also be usable when there is no index set available, and will then simply use the active tab.
This is only relevant for indented soft wrap where e.g. the text following the soft break is underlined: Previously we would then render an underline for the soft break node itself (which normally consists of whitespace).
VoiceOver can announce text formatting, such as bold font, italics,
underline, font, etc., as well as whether text is misspelled. For this,
it needs the AXAttributedStringForRange attribute supported. This commit
does exactly that.
Testing can be done in this way (VO stands for Ctrl-Option):
* first interact with the text (VO-Shift-down arrow when standing
on the text element)
* to announce text attributes for character after cursor, press VO-T
* to seek for next:
* misspelled text: VO-Cmd-E
* color change: VO-Cmd-K
* underlined text: VO-Cmd-U
* many more (see VO-H-H, "Find", close help with Esc)
* to seek for previous *: just add Shift to the shortcut
Some attributes remain to be supported (full list of attributes is available at: https://developer.apple.com/library/mac/documentation/cocoa/reference/applicationkit/Protocols/NSAccessibility_Protocol/Reference/Reference.html#//apple_ref/doc/uid/20000945-SW53).
The misspelled text VoiceOver support can be used nicely with TextMate's
spelling support:
1. the user finds next mistake with VO-Cmd-E, hears the misspelled word,
perhaps reads it on a braille display
2. the user then presses Cmd-; to show the spelling menu for that word
and chooses the desired resolution (apply suggested correction etc.)
3. go back to step 1. :-)
When the tab bar overflows and the selected tab would normally be rendered outside the visible area, we use the last visible tab as a proxy. With this commit, the last visible tab keeps showing the document if switching to another (visible) tab.
Presently buffer_t::wait_for_repair will use the grammar from the main thread (rather than wait for the parse thread to finish) which does cause a race condition since the parser will now mutate the grammar (graph coloring).
Ideally buffer_t::wait_for_repeat would simply wait for the parser to finish, but I’d prefer to first switch the parser to use GCD.
If nothing was misspelled in the updated range, and a value existed for the end of the range (indicating that what followed the updated range was misspelled) then that value would be erased.
If the spelling panel is visible when checkSpelling: is invoked then its language is taken and used for the buffer. If the panel is not visible, the buffer’s language is set for the spelling panel.
We probably should also set the spelling panel’s language when switching document, and when the panel is first opened. I don’t think the code complexity is really worth it though (depends on how often one use the spelling panel with a non-default language).
Fixes#1104
This is unimplemented and I probably won’t implement it unless there is a very compelling use-case.
The Text → Transpose action can already transpose words, either when separated by whitespace, comma, etc., or when the words are selected as two (or more) discontinuous selections.
Closes#1109
We invalidate the entire buffer since the word can appear in multiple locations. This could be optimized to only invalidate misspelled instances of the ignored or learned word. Likewise, we redraw entire buffer since the refresh macro is not able to handle changes in spelling meta data and calculate minimal refresh region.
Now using Edit -> Spelling -> Check Spelling selects next spelling error or one
at caret if it was not yet selected, then shows context menu with correction
suggestions.
This makes checking spelling as easy as tapping Cmd+;
Closes#1103
UTIs are taken from both the Apple supplied list and newly created for those that didn't exist. For those languages where no clear 'owner' existed to provide the reverse-DNS notation we use a com.macromates.* stand-in.
The behavior is based on Safari where last visible tab is swapped with the selected tab, if selected tab itself would not be visible.
Commit edited by Allan Odgaard, original version used document icons in overflow menu and would make the effective last tab sticky.
Closes#1060