Commit Graph

2256 Commits

Author SHA1 Message Date
Allan Odgaard
bf1f1ef4f6 Checkin release notes v2.0-alpha.9513 2014-02-21 17:44:08 +07:00
Allan Odgaard
fbafcfb87e Ignore links when recursively expanding file browser items
Symbolic links can point to ancestor items and cause cycles, which would cause the (recursive) expansion to newer terminate.
2014-02-21 11:51:11 +07:00
Allan Odgaard
4015859bd3 Allow inline expansion of symbolic links (in file browser)
This is enabled by running: defaults write com.macromates.TextMate.preview allowExpandingLinks -bool YES
2014-02-21 11:48:34 +07:00
Allan Odgaard
8956207789 Avoid detached objects in core data store 2014-02-20 22:40:20 +07:00
Allan Odgaard
56a906a0ac Use temporary pasteboards when replaying macros
This applies to search, replace, and (unless disabled) regular pasteboard.
2014-02-20 22:22:55 +07:00
Allan Odgaard
aec82de6e2 Implement kReplace / kReplaceAndFind actions
These are used when replaying macros.
2014-02-20 22:09:36 +07:00
Allan Odgaard
17dca05dba Let editor_t remember (regexp) captures from editor_t::find 2014-02-20 22:09:36 +07:00
Allan Odgaard
73755bf744 Update Onigmo submodule 2014-02-20 22:09:36 +07:00
Allan Odgaard
aff813203b Find macro actions now populate the search/replace pasteboard
This should be consistent with TextMate 1.x and is required for the replace actions.
2014-02-20 22:09:36 +07:00
Allan Odgaard
362c18c3e0 Record current replace string as part of macro find action
Previously we would only record it if the user invoked a replace action from the find dialog, but the user may invoke “find” from the dialog and then subsequently “replace” via keyboard/menu (where we would not record the string).
2014-02-20 22:09:35 +07:00
Allan Odgaard
b0bfaffc17 Update MASPreferences submodule 2014-02-20 13:17:11 +07:00
Allan Odgaard
95b834ac0a Grammars with no root scope are no longer shown in the UI
Only injection grammars should have an empty root scope, and if so, it does not make sense to allow the user to pick it as document grammar.
2014-02-20 13:14:36 +07:00
Allan Odgaard
520084a08c Limit clipboard history to about 10,000 items
Once we reach the threshold we delete half the history to ensure a good amortized time complexity.
2014-02-20 10:34:49 +07:00
Allan Odgaard
1f74cef1bd Avoid storing ‘false’ (as value) in bundle items
Since we treat a missing key as having the value ‘false’ there is no need to write out keys set to false. This was partly motivated by improving cached data since here we store non-strings as binary property lists, and boolean values are non-strings (not that we have that many keys set to false, but it would e.g. happen if user disable an item and later enable it).
2014-02-19 20:48:13 +07:00
Allan Odgaard
be2eff9825 When replaying fs-events we would not reload changed items
When we see a changed item we drop it from the cache and mark the cache as “incomplete”, indicating that the bundle index should be rebuilt, which in turn causes all known items to be fetched, and the cache will thereby reload the updated entries.

However, when replaying fs-events, we are in a “rebuild index” state and would not re-rebuild the index incase items were dropped.
2014-02-19 20:11:52 +07:00
Allan Odgaard
4f5f20947a Ensure pending bundle index changes are saved during quit 2014-02-19 19:37:39 +07:00
Allan Odgaard
162ba1649c Rename project-state.db → RecentProjects.db 2014-02-19 18:01:00 +07:00
Allan Odgaard
8c9ebc46ea Ignore caret’s “desired X” in positionForWindowUnderCaret:
For example if at column 60 on a line and moving up/down to a shorter line, we remember that column 60 is our desired column position. This would previously be used when returning a position for the caret, e.g. used with clipboard history pop-ups and bundle item disambiguation menus.
2014-02-19 15:41:48 +07:00
Allan Odgaard
b1ec5cf4c2 Use CoreData for storing clipboard history
Previously this was stored in NSUserDefaults. The problem with that approach is that if large items were stored in the history, it would cause slowdowns, presumably by periodic writing the entire user defaults to disk.
2014-02-19 15:34:07 +07:00
Allan Odgaard
a8c269e75c Call ‘atos’ via xcrun 2014-02-18 23:09:53 +07:00
Allan Odgaard
59e27e5cbb Avoid direct instance variable access 2014-02-18 20:37:26 +07:00
Allan Odgaard
978b85cc1d Refactor OakPasteboard class
Remove logic from the setter methods and limit their use. This is in preparation for making the classes NSManagedObject subclasses where we prefer to use the generated accessor methods.
2014-02-18 17:42:01 +07:00
Allan Odgaard
fe1f50f279 Do not store captures (from regexp matches) on replace clipboard
Instead these are stored as an OakTextView property. This makes more sense since we only want to use the captures in the text view that created them.
2014-02-18 13:16:27 +07:00
Allan Odgaard
57e8e37313 Rename NSReplacePboard → OakReplacePboard
We shouldn’t use Apple’s prefix for our own constants. The actual value of the constant hasn’t been renamed yet as this requires “migration” (renaming the key in user defaults).
2014-02-18 12:41:47 +07:00
Allan Odgaard
e80bf978ec Minor OakPasteboard(Entry) interface changes 2014-02-18 12:35:22 +07:00
Allan Odgaard
e5e4957e39 Limit explicit options stored on find clipboard
This is to get a “cleaner” history (saved on disk).
2014-02-18 11:57:12 +07:00
Allan Odgaard
a088336453 Ensure system clipboard is always updated 2014-02-18 11:56:32 +07:00
Allan Odgaard
82299a4f39 Move code from OakPasteboard instance to class object
This is in preparation of making the class an NSManagedObject subclass, so we want as little code there as possible.
2014-02-18 11:54:34 +07:00
Allan Odgaard
8ebbb338c2 Disallow creating OakPasteboardEntry outside OakPasteboard.mm
This is in preparation of adopting CoreData which will require a managed object context to create pasteboard entry objects.
2014-02-18 11:53:41 +07:00
Allan Odgaard
0da5fedf6c Do not add transient pasteboard items to history
See http://nspasteboard.org for details.
2014-02-18 11:53:20 +07:00
Allan Odgaard
e2d2b1ef6a Do not pass -fobjc-default-synthesize-properties to clang
This option was removed in revision 191551 of clang (Sep 27, 2013).

Property synthesizing seems to now be default, it’s unclear to me what revision of clang made the behavior default, but since we require a fairly recent version for other things (like Cap’n’proto) I don’t think this change will cause a problem.
2014-02-15 09:40:59 +07:00
Allan Odgaard
ed852ae5b2 Empty delta bundle items no longer result in a file on disk
For example if the user makes a change and later reverts it (in the bundle editor) there should no longer be a local (delta) item saved. Though the containing delta bundle remains (but ideally that should be removed as well).
2014-02-14 22:37:55 +07:00
Allan Odgaard
3aa383a166 GitHub releases API is no longer in preview 2014-02-14 13:35:54 +07:00
Allan Odgaard
9cfd98446f The ng::word_at function would not extend selection to full word
This would affect the buffer completion, which would work sub-optimally when selecting part of the word for replacement.
2014-02-14 00:40:54 +07:00
Allan Odgaard
b3d12b4364 Set explicit target for status bar menu items
These items were relying on “first responder” which only works when focus is in the document view (since that’s the object that implements the actions).

This would manifest itself by showing the items disabled when focus was in the file browser, and for the grammar pop-up, the selected item (after opening the menu) would not be reverted back to the actual selected grammar in the document view.

Closes #1213
2014-02-13 13:38:35 +07:00
Ronald Wampler
f99cf4bbdd Fix typo in contacts usage description 2014-02-13 13:38:35 +07:00
Allan Odgaard
a5ab9a7d03 Checkin release notes v2.0-alpha.9511 2014-02-12 20:52:53 +07:00
Allan Odgaard
02eae4c494 Enable truncation of status bar text in chooser dialogs 2014-02-12 20:46:08 +07:00
Allan Odgaard
16c7679c0a Use ng::word_at for what to complete
This way we won’t try to complete whitespace.
2014-02-12 20:08:41 +07:00
Allan Odgaard
112a3a9e80 Allow aborting commands by pressing ⌘. or ⌃C 2014-02-12 15:50:13 +07:00
Allan Odgaard
7fb5b75219 Restore default signal handlers for commands
Before this commit it wasn’t possible to SIGINT / SIGTERM commands launched from TextMate since TextMate itself has a custom handler for these signals (so they are set to be ignored) — this included pressing ⌃C in the HTML output window (for commands using the TextMate.Executor API).
2014-02-12 15:08:28 +07:00
Allan Odgaard
f128304d75 Handle non-mouse/key events while running commands
Fixes textmate/diff.tmbundle#5
2014-02-12 11:33:37 +07:00
Allan Odgaard
1c14143575 Switch file from C++ to Objective-C++ 2014-02-12 11:15:29 +07:00
Allan Odgaard
3b760492a8 Do not set TM_CURRENT_WORD if caret is surrounded by whitespace
This is consistent with “word” as input for commands.
2014-02-11 20:56:38 +07:00
Allan Odgaard
da31c2d11a Introduce ng::word_at (refactoring) 2014-02-11 20:55:01 +07:00
Allan Odgaard
c54c2c89f2 Only set TM_CURRENT_WORD when we have a word 2014-02-11 20:47:01 +07:00
Allan Odgaard
f90ff29c96 Checkin release notes v2.0-alpha.9509 2014-02-11 17:02:46 +07:00
Allan Odgaard
18d9aa030b Add -u/--uuid option to mate shell tool
If no files are specified, the -w flag is not used, and TM_DOCUMENT_UUID is set, then this argument defaults to the value of the TM_DOCUMENT_UUID environment value.
2014-02-11 16:45:39 +07:00
Allan Odgaard
10f14a74f3 Support referencing documents via UUID
This support is to allow using ‘mate’ to change caret/selection for open untitled documents.
2014-02-11 16:38:58 +07:00
Allan Odgaard
c7462eedd7 Allow disabling folder state restore
Presently this will also disable it if the folder is opened via the Recent Projects chooser. Ideally opening via this list should not disable folder state restoring.
2014-02-11 14:23:34 +07:00