Commit Graph

2002 Commits

Author SHA1 Message Date
Allan Odgaard
9b709dbeb3 Checkin release notes v2.0-alpha.9477 2013-09-06 12:15:09 +02:00
Allan Odgaard
5c8de4204c Use static C strings for scopes from grammar_t
This avoids a copy and while it doesn’t seem to make things faster, it should limit memory usage.
2013-09-06 11:55:36 +02:00
Allan Odgaard
3a988014d3 Do not copy C strings used with scope_t::push_scope 2013-09-06 11:53:58 +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
Allan Odgaard
160dcf50af Use local variable for document->buffer() 2013-09-04 12:55:15 +02:00
Allan Odgaard
13ca6b731e Update spelling panel and use when visible 2013-09-04 12:55:15 +02:00
Allan Odgaard
a20778f5de Enable text view’s context menu actions 2013-09-04 12:55:15 +02:00
Allan Odgaard
ae708eaa41 Remove Text → Transpose Words
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
2013-09-03 16:48:00 +02:00
Adam Strzelecki
de21c812a9 Only show suggestions when Check Spelling is called via menu item
Otherwise just select next spelling error on Check Spelling, which is called by
spelling panel as well.
2013-09-03 15:06:40 +02:00
Adam Strzelecki
b0b182e2e1 Invalidate spelling when ignoring or learning a word
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.
2013-09-03 15:06:40 +02:00
Adam Strzelecki
6997fb820e Reduce text overlap when showing context menu 2013-09-03 15:06:40 +02:00
Adam Strzelecki
cc137f3c24 Add Show Next for quick spelling iteration
Also add key equivalents to spell popup menu.
2013-09-03 15:06:40 +02:00
Adam Strzelecki
6c6316573f Implement Check Spelling
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
2013-09-03 15:06:07 +02:00
Allan Odgaard
02e64d17e6 Remove unused operation queue type 2013-09-03 12:27:20 +02:00
Allan Odgaard
e4e80a946c Use std::make_shared 2013-09-03 12:27:20 +02:00
Allan Odgaard
d58bb1fdde Avoid using NULL_STR with scope_t::push_scope 2013-09-03 12:10:18 +02:00
Michael Sheets
c1bdbfa975 Use UTIs for both application and Quicklook generator
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.
2013-09-03 12:10:18 +02:00
Ronald Wampler
e631068c56 Show a chevron menu button when tab bar overflows
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
2013-09-03 10:37:43 +02:00
Allan Odgaard
29ba700c71 More encapsulation 2013-08-31 21:24:39 +02:00
Allan Odgaard
ba29e90762 Remove redundant assert 2013-08-31 21:24:39 +02:00
Allan Odgaard
91fb146f26 Remove custom debug/trace log system 2013-08-31 21:24:39 +02:00
Allan Odgaard
95376adb79 Convert scope match API to accept C strings 2013-08-31 21:24:39 +02:00
Allan Odgaard
f67c91dcb9 Introduce C string API
This may seem like a step back, but is the easiest way to deal with “static strings” (that should not be copied).
2013-08-31 21:24:39 +02:00
Allan Odgaard
caf347e66d Remove unused to_s functions 2013-08-31 21:24:39 +02:00
Allan Odgaard
f0a932e9e4 Remove unused comparison operators 2013-08-31 21:24:38 +02:00
Allan Odgaard
96e0a6e0ff Improve encapsulation 2013-08-31 21:24:38 +02:00
Allan Odgaard
9bf9c51494 Use linked list for scope_t data 2013-08-31 21:24:38 +02:00
Allan Odgaard
0a8a238159 Add more scope selector tests 2013-08-31 20:49:47 +02:00
Allan Odgaard
d241a971f2 Update scope selector matching code
This is in anticipation of changing scope_t data layout.
2013-08-31 20:48:25 +02:00
Allan Odgaard
c01e181b49 Use name convention to identify non-content scopes 2013-08-31 16:09:49 +02:00
Allan Odgaard
cc56c61c78 Remove scope::types::atom_t
This is first step toward decreasing memory usage by scope_t.
2013-08-31 16:09:49 +02:00
Allan Odgaard
0f5bbdfad0 Remove unused scope parsing API 2013-08-31 16:09:49 +02:00
Allan Odgaard
c0e8186bc1 When constructing scope, split string on space instead of parsing 2013-08-31 16:09:48 +02:00
Allan Odgaard
05b0b480f1 Handle assigning empty scope to non-empty scope 2013-08-31 16:09:48 +02:00
Allan Odgaard
b52b13329e Call scope_t::empty instead of using an operator bool cast 2013-08-30 12:30:34 +02:00
Allan Odgaard
240dc4baec Simplify scope::shared_prefix and scope_t::has_prefix
This is mainly for upcoming implementation changes.
2013-08-30 12:30:34 +02:00
Allan Odgaard
b624d7cc98 Treat empty string as empty scope
Previously would be a scope with one empty “atom”.
2013-08-30 12:30:34 +02:00