Commit Graph

1939 Commits

Author SHA1 Message Date
Shelby Munsch
283ecd069e Fixed typo 2013-08-27 22:49:47 -07:00
Allan Odgaard
1442e3061f Remove old scope_t API 2013-08-28 00:23:08 +02:00
Allan Odgaard
7247695f9b Update buffer_t::scopes to new scope_t API 2013-08-28 00:23:08 +02:00
Allan Odgaard
d42417ee1a Use public API for scope_t utility functions 2013-08-28 00:23:08 +02:00
Allan Odgaard
1cc0065623 Return false from ‘scope_t::operator bool’ when there is no scope 2013-08-28 00:23:08 +02:00
Allan Odgaard
33ed6b6637 Watch leaks for grammar_t 2013-08-28 00:23:08 +02:00
Allan Odgaard
d93b20d571 Use new scope_t API 2013-08-28 00:23:08 +02:00
Allan Odgaard
5da71f9556 Add new API for mutating scope_t 2013-08-28 00:23:07 +02:00
Allan Odgaard
cfa913d0f5 Fix retain cycle 2013-08-28 00:23:07 +02:00
Allan Odgaard
057096af5b Rename API to make searching easier
Using generic names like ‘append’ is not good when analyzing code for potential refactoring.
2013-08-27 15:30:09 +02:00
Allan Odgaard
275273d39b Add missing “is content scope” argument 2013-08-27 15:30:09 +02:00
Allan Odgaard
80e26b1faa Don’t dereference end-of-range iterator 2013-08-27 15:30:09 +02:00
Allan Odgaard
7ccd7add60 Use digittoint() instead of std::stoi()
Both because of performance and because the latter can throw an exception (although we check the input, so it should not happen with our use of the API).
2013-08-27 15:30:09 +02:00
Allan Odgaard
e1230653f8 Support hex characters in format strings 2013-08-27 15:30:09 +02:00
Allan Odgaard
6af97e5f51 Checkin release notes v2.0-alpha.9475 2013-08-26 15:54:05 +02:00
Allan Odgaard
df7cbc8da0 Add debug code 2013-08-26 15:54:05 +02:00
Allan Odgaard
8f1485d158 String given to scope_t::append now returned from scope_t::back
Previously we would parse the string appended to an existing scope, meaning invalid scopes would not be returned as the same string.

Fixes #1099
2013-08-26 15:54:05 +02:00
Allan Odgaard
bcece9a8e5 Don’t make selection visible when nothing is found 2013-08-26 12:02:29 +02:00
Allan Odgaard
211770893e When in Favorites folder, change Add → Remove From Favorites
In practice it is possible to be in a parent of the Favorites folder and expand items so that the symbolic links in favorites can be selected, this commit does not handle that case, as we would then also need to handle the case where items both inside and outside the Favorites folder were selected (at the same time).

Users who do these things are probably aware of how symbolic links work, and can use “Move to Trash”.

Closes #1089
2013-08-26 11:48:41 +02:00
Allan Odgaard
62db7aff11 Add comparison operators to what’s understood by ⌃T 2013-08-26 11:26:56 +02:00
Allan Odgaard
64663dd17f Allow creating non-capturing regexps 2013-08-25 21:13:06 +02:00
Allan Odgaard
a4a5799835 Don’t leave buffer in partial state if failing to parse grammar 2013-08-25 21:13:06 +02:00
Allan Odgaard
de03c27a63 Update network::tbz_t API
The main issue with the old API was inability to capture error output from the tar process.
2013-08-25 21:13:06 +02:00
Allan Odgaard
d2305654ac Make redirect of stderr opt-in 2013-08-25 21:13:06 +02:00
Allan Odgaard
7e6d0b8d1b fixup! Log errors from each call in swap_and_unlink 2013-08-25 21:13:06 +02:00
Allan Odgaard
896416c3e9 Check pointer is initialized before using it
I see a few crash reports that indicate this code is called without a valid ‘bundleItemContent’, though unsure how to reproduce.
2013-08-25 21:13:06 +02:00
Allan Odgaard
e27f9f4071 Fix scopes when re-running parser on captures
If we have multiple overlapping captures and define rules for one of these, the scopes would not be stacked correctly.

Unfortunately the fix (for this rare edge case) does degrade parser speed, as we need to switch to an alternative way of keeping track of scopes, yet for injection grammars, we need to also keep the old system (to have the “current” scope available as a scope_t instance), so while the new system is almost as fast as the old, using both is not.

There should be a few ways to optimize scope_t construction, so that this part will add less overhead in the future (I think it’s roughly 5-10% of parsing time spent to scope_t related stuff).
2013-08-25 17:58:08 +02:00
Allan Odgaard
0a465955d1 Allow peeking at the last element of a scope
This is useful when constructing scopes during parsing.
2013-08-25 17:58:08 +02:00
Allan Odgaard
7115b80051 Skip processing empty captures 2013-08-25 17:58:07 +02:00
Allan Odgaard
36c5ff4288 Support ${var} in regexp part of format string transformations 2013-08-24 20:28:16 +02:00
Allan Odgaard
695ff4c703 Improve the “swap” functionality of ⌃T
See tests for details.
2013-08-24 20:28:16 +02:00
Allan Odgaard
1f4a131adc Checkin release notes 2013-08-24 01:38:20 +02:00
Allan Odgaard
15a15e8c15 Remove prototype for unimplemented member function 2013-08-24 01:19:29 +02:00
Allan Odgaard
bbe14f0a0b Add mutex for bundles::item_t::plist
This is (once again) only for the concurrent tests, although we probably do want to use the bundles API from more threads in the future.
2013-08-24 01:19:29 +02:00
Allan Odgaard
374f8a2248 Make oak::callbacks_t somewhat thread safe
If we only add, remove, and signal callbacks, the data type is now thread safe. This is mainly for the purpose of the concurrent tests.
2013-08-24 01:19:29 +02:00
Allan Odgaard
9f99fe92b6 Don’t access invalid iterator when creating delta plists 2013-08-24 01:19:29 +02:00
Allan Odgaard
c5ecf8f6c6 Handle *.c++ files in gen_build
We already handle these when mapping extension to file type.
2013-08-24 01:19:29 +02:00
Allan Odgaard
97c7a01fe1 Ensure grammar is retained during parsing
Since parsing is done in a separate thread, and it works with pointers, we need to ensure that the grammar is retained for at least as long as the thread lives.
2013-08-24 01:19:29 +02:00
Allan Odgaard
6889ba9ba7 Log errors from each call in swap_and_unlink 2013-08-23 23:21:16 +02:00
David Howden
1faaf77d99 Stop Find window showing an NSSavePanel on ⌘S 2013-08-23 23:21:16 +02:00
Allan Odgaard
2022fab80c Commands with input set to none would not have stdin closed
This meant if such command would read from its stdin, it would hang.

Fixes #1081
2013-08-21 22:51:40 +02:00
Allan Odgaard
b5b029407d Checkin release notes v2.0-alpha.9467 2013-08-21 22:20:43 +02:00
Allan Odgaard
802ea1fc7a Treat most errors from exchangedata() as “not supported”
It seems to be a general trend with network file systems to return wrong errors when they do not support a certain feature (like extended attributes and atomic swap).
2013-08-21 22:20:43 +02:00
Allan Odgaard
c8802cc534 Support keys with dots in delta property lists functions 2013-08-21 13:44:47 +02:00
Allan Odgaard
e36133ec7a Update plist delta code 2013-08-21 13:44:17 +02:00
Allan Odgaard
6d1c334785 Add ability to close HTML output window on ⌃⌥⌘H 2013-08-21 13:44:17 +02:00
Allan Odgaard
32f4cedece Bring HTML output window to front on ⌃⌥⌘H when not already key
Previously it would hide if already visible regardless of being the key window or not.
2013-08-21 13:44:17 +02:00
Allan Odgaard
cab42a83c5 Use injection patterns from “group rules”
For example if one grammar includes another, the included grammar works as a group rule and previously had its injections ignored.
2013-08-20 18:43:18 +02:00
Allan Odgaard
5752aa2dd7 Make it explicit, if a match is from a rule’s end pattern 2013-08-20 18:43:18 +02:00
Allan Odgaard
c7be71b41d Code shuffle 2013-08-20 18:43:18 +02:00