Commit Graph

2035 Commits

Author SHA1 Message Date
Steven Clukey
b325a9f03d Add "invisibles" option to the .tm_properties file
This setting allows changing which invisibles are shown and what glyph
is used for them.

Invisibles are '\t', '\n', and ' ', to turn one off, add ~[\t \n] to
the settings string. To set the glyph used for the invisible, add [\t
\n][glyph_to_use].
v2.0-alpha.9481
2013-10-04 17:09:05 +02:00
Steven Clukey
605dda1674 Added spaces as an invisible 2013-10-04 17:09:05 +02:00
Allan Odgaard
5f765ab061 Use encoding::classifier_t when opening files 2013-10-04 17:09:02 +02:00
Allan Odgaard
bd978fcb7e Add naive encoding classifier 2013-10-04 17:08:21 +02:00
Allan Odgaard
344fac505b Improve the “unknown encoding” sheet
A preview is now shown with the problematic lines highlighted.
2013-10-04 17:08:12 +02:00
Allan Odgaard
a2131a6472 Add two-way binding support to OakEncodingPopUpButton
Previously binding to the view’s encoding property would not update the bound object when the view changed its value.
2013-10-04 16:53:50 +02:00
Allan Odgaard
2fe3b95585 Add debug output 2013-10-04 16:51:27 +02:00
Allan Odgaard
f87724f406 Rules are (unfortunately) not const during parsing
This is because of the “included” boolean we use to mark rules to avoid collecting them twice.
2013-10-04 16:51:27 +02:00
Allan Odgaard
558d7ee8b9 Don’t default placeholders with no default text as mirrors 2013-10-04 16:51:27 +02:00
Allan Odgaard
4363a27897 Source bash_init.sh for code in snippets that have no shebang
This is consistent with TextMate 1.x behavior.

Fixes ruby.tmbundle#56
2013-10-04 16:51:27 +02:00
Allan Odgaard
40233245e2 Add crash report info to code involved in a crash 2013-10-04 16:51:27 +02:00
Allan Odgaard
c602958e66 Don’t stack allocate space for extended attribute values
Seeing a few crashes related to this, most likely because an extended attribute holds a value larger than available stack space.
2013-10-04 16:51:27 +02:00
Allan Odgaard
c5558d0574 Remove a few std::shared_ptr typedefs 2013-10-04 16:51:26 +02:00
Allan Odgaard
fe9b6b0721 Workaround for Xcode 5
My interpretation: The old inline array is interpreted as an initializer list which cannot (yet) be used with Objective-C objects when ARC is enabled.

Fixes #1037
2013-09-22 12:55:42 +02:00
Allan Odgaard
76dc76b57a Fix typo in debug output 2013-09-22 12:55:42 +02:00
Allan Odgaard
72791ce406 Update last effective tab when number of tabs change
Closes #1120
2013-09-15 21:32:15 +02:00
Allan Odgaard
9fe5a058ce Make buffer_t::wait_for_repair a no-op with no grammar 2013-09-15 21:22:44 +02:00
Allan Odgaard
b4f7fc9a49 Remove unsupported encodings (libiconv v2.4.0) 2013-09-15 21:22:44 +02:00
Allan Odgaard
cf599498a9 Fix encoding names for Atari ST, GB_1988-80, and HZ-GB-2312 2013-09-15 21:22:44 +02:00
Allan Odgaard
e6541240a9 Checkin release notes 2013-09-15 20:20:07 +02:00
Allan Odgaard
3e2567d2d0 Add Sticky and Close Tabs to the Right to File menu
The title of the Sticky item is nonsensical, but I couldn’t come up with anything good.

Closes #1110.
2013-09-12 23:46:05 +02:00
Allan Odgaard
712a18cd50 Add IBAction to methods 2013-09-12 23:46:05 +02:00
Allan Odgaard
1ae67343f1 Add menu validation for close tabs related actions 2013-09-12 23:46:05 +02:00
Allan Odgaard
35ad8a1ed9 Add action method for closing tabs to the right 2013-09-12 23:46:05 +02:00
Allan Odgaard
aa08d67090 Let tab menu methods fallback on active tab
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.
2013-09-12 23:46:05 +02:00
Michael Sheets
683ccd3ab2 Add icon definitions to CFBundleDocumentTypes
Works around a bug where icons are not inherited from the UTI definitions.
2013-09-12 23:46:04 +02:00
Allan Odgaard
fb8627d077 Intersect left/right scope for rendering soft break nodes
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).
2013-09-12 23:46:04 +02:00
Allan Odgaard
e4a5db0f3b Only first call to window.close() would have an effect
This is a workaround for https://bugs.webkit.org/show_bug.cgi?id=121232
2013-09-12 23:46:04 +02:00
Allan Odgaard
776a8d46d9 Fix window.close() for HTML output embedded in main window 2013-09-12 23:46:04 +02:00
Allan Odgaard
f251c0b7d3 Do not re-use closed HTML output windows 2013-09-12 23:46:04 +02:00
Allan Odgaard
2f72f84ae5 Add leak watcher and some debug output 2013-09-12 23:46:04 +02:00
Allan Odgaard
3f055aa318 Clear all web view delegates during dealloc 2013-09-12 23:46:04 +02:00
Allan Odgaard
8c7e68bf2f Ensure that at least 8 tabs stay open when auto-pruning 2013-09-12 23:46:03 +02:00
Boris Dušek
21088105a8 Support text attributes with VoiceOver
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. :-)
2013-09-12 23:13:57 +02:00
Ronald Wampler
08b0b5ba0b Let OakFinderLabelChooser draw and manage it's own title
This removes the need to create and manage a separate menu item
as a placeholder for the title of the color swatch in the file
browser action menu.
2013-09-12 23:13:57 +02:00
Allan Odgaard
2ad5b2fb59 Checkin release notes 2013-09-06 16:01:44 +02:00
Allan Odgaard
96283a6554 Update to Cap’n Proto v0.3.0 2013-09-06 11:53:58 +02:00
Allan Odgaard
e2660960e7 Reject bundle index cache if version is not the current 2013-09-06 11:53:58 +02:00
Allan Odgaard
2107223460 Don’t close file descriptor until after ~PackedFdMessageReader()
The message reader may use the file descriptor in its destructor, which is why we can’t close it until that object has been destroyed.
2013-09-06 11:53:41 +02:00
Allan Odgaard
d3a78e59f2 Put posix_spawn related failure in crash report 2013-09-05 23:57:03 +02:00
Allan Odgaard
f346f2e717 Ensure delegate is retained 2013-09-05 23:57:02 +02:00
Allan Odgaard
1c308c810d Use map::emplace instead of inserting std::pair (C++11) 2013-09-05 20:59:11 +02:00
Joachim Mårtensson
ca98e2f86d Use std::atomic family 2013-09-05 20:59:10 +02:00
Allan Odgaard
aa24f237c6 Make last effective (proxy) tab sticky
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.
2013-09-05 17:26:48 +02:00
Allan Odgaard
5c4573873f Protect grammar_t with mutex
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.
2013-09-05 17:26:47 +02:00
Allan Odgaard
69be0205ba Fix update of misspelled ranges
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.
2013-09-05 12:41:30 +02:00
Allan Odgaard
145a4f6386 Implement NSChangeSpelling and NSIgnoreMisspelledWords 2013-09-05 12:41:30 +02:00
Allan Odgaard
b832a8d7d0 Use specialized menu for Check Spelling
We only show “Find Next” (previously “Show Next”) when context menu is shown as a result of “Check Spelling” and we leave out the other actions.
2013-09-04 12:55:16 +02:00
Allan Odgaard
68bf3efff9 Synchronize spelling panel and buffer languages
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
2013-09-04 12:55:16 +02:00
Allan Odgaard
d265d24441 Enable “Check Spelling as You Type” in checkSpelling:
This is required so that we have the proper meta data (misspelling ranges).
2013-09-04 12:55:16 +02:00