Commit Graph

1724 Commits

Author SHA1 Message Date
Allan Odgaard
fddec119fe Print debug info when saving from bundle editor v2.0-alpha.9447 2013-07-23 13:14:50 +02:00
Allan Odgaard
83946bd3cf Treat relative txmt: URLs as relative to home folder
This is supported to be compatible with TextMate 1.x.

Fixes #1047.
2013-07-22 11:01:27 +02:00
Allan Odgaard
5fc03a8630 Don’t ignore save errors for multi-file search/replace
For this change I have made the FFDocumentSearch class inherit from NSDocument. This way, we can register it with the window controller and will get callbacks when the window is about to close, with the option to cancel closing of the window. This approach seems much simpler than the alternative, which would be to introduce our own callback/delegate system for window closing, or have the window controller know about saving files.
2013-07-22 03:00:13 +02:00
Allan Odgaard
8b32837a39 Force cache invalidation when deleting bundle items
This is to workaround missing fs-events. Ideally the bundle item itself would do the cache invalidation, since it’s complicated to deduce what paths need rescanning after a delete.
2013-07-21 22:54:12 +02:00
Allan Odgaard
97caace4d2 Some further tweaks related to stopping search
We now show “Stopped.” as status text when search is prematurely terminated.
Closing window also cause search to stop.
The stop button has ⌘. as key equivalent (the standard “cancel” key).
Don’t let the stop action go via the search action dispatcher.
2013-07-21 22:54:12 +02:00
David Howden
cfb2335761 Added “Stop Search” button to Find dialog
Previously wasn't possible to stop a search in progress (even
when closing the Find window).
2013-07-21 17:36:16 +02:00
Jacob Bandes-Storch
b533df1a40 Bar button positioning tweaks 2013-07-21 13:42:43 +02:00
Allan Odgaard
25ed8b4e62 Highlight pairs can now be regular expressions
These settings are also consulted for “pair movement”, i.e. ⌃↓/⌃↑ and ⇧⌘B, so by using regular expressions we can match begin/end tags and navigate between these.
2013-07-21 13:25:30 +02:00
Allan Odgaard
920d75b2e7 Remove warning from regexp test
The problem is with the underlying library and has been reported to its issue tracker.
2013-07-21 13:25:30 +02:00
Allan Odgaard
3a359ca52d Limit resources copied to target bundle
Without the ‘.png’ extension we would match the ‘Header Icons’ folder, and (recursively) copy that to our target, so the contents of the folder would exist in two places in the target (with and without the folder).
2013-07-21 13:25:29 +02:00
Allan Odgaard
27eee5ed59 Remove oniguruma 5.9.2 files 2013-07-21 13:25:29 +02:00
Allan Odgaard
e0c7a3df57 Switch regexp library: oniguruma → onigmo 2013-07-21 13:25:29 +02:00
Allan Odgaard
7a3161a91d Setup Onigmo target 2013-07-21 13:25:29 +02:00
Allan Odgaard
22d892f6b5 Add Onigmo submodule 2013-07-21 13:25:29 +02:00
Allan Odgaard
a42e93f8b8 Ensure -include «pch» is the first compiler option
This is incase we want to set ‘-include’ via a FLAGS variable, as that only works when it is listed after a potential precompiled header include.
2013-07-21 13:25:29 +02:00
Allan Odgaard
c9812c5e8a Do not set hidden visibility for C sources
This is for oniguruma and ideally we would set this only for the oniguruma target, but then we need special precompiled headers for that target, so this is a practical way to achieve the goal (there are no other C sources in the build tree).
2013-07-21 13:25:29 +02:00
Allan Odgaard
81d065ab8e Use oniguruma’s default character type (OnigUChar)
This introduces a bunch of typecasts but means that less patching is required when updating the library.
2013-07-21 13:25:28 +02:00
Allan Odgaard
8987f3e483 Remove unused function: pattern_t::indices_for_group 2013-07-21 13:25:28 +02:00
Allan Odgaard
3026001988 Fix issue with merging delta property lists 2013-07-21 13:25:28 +02:00
Allan Odgaard
491fc8a3e3 Add missing semi-colons after assertion 2013-07-21 13:25:28 +02:00
Allan Odgaard
2c307cabce Allow setting a tab as “sticky”
Presently this can only be done by right-clicking the tab and selecting the “Sticky” option — if a tab is sticky then it will not be closed when executing any of the batch close actions (Close All Tabs, Close Other Tabs, Close Tabs to the Right, and holding option down while opening a file via file browser or file chooser).

Closes #1038.
2013-07-21 13:25:28 +02:00
Allan Odgaard
32e18b2697 Improve code to find “paired character ranges”
The algorithm now handle overlapping character ranges like: ‘(f{o)o}’ and unpaired characters surrounded by character pairs.

This is for selecting (⇧⌘B) and moving to the begin or end of the range (⌃↓/⌃↑).
2013-07-21 13:25:28 +02:00
Allan Odgaard
ad02f214ac Improve readability of brace movement tests 2013-07-21 13:25:27 +02:00
Allan Odgaard
60d07b061e Use ruby 1.8 in the shebang for new commands
Using the ruby found via PATH would require the command to be tested with ruby 1.8, 1.9, 2.0 and possibly alternative ruby implementations (rubinus, jruby, …) so best to be explicit about which version the command is written for.
2013-07-21 13:25:27 +02:00
Allan Odgaard
1b61c9c688 Fix “unused variable” compiler warning 2013-07-21 13:25:27 +02:00
Allan Odgaard
87a04549ec Add “related file” settings for *.go (test) files
With this setting ⌥⌘↑ will switch between test and non-test *.go files.
2013-07-21 13:25:27 +02:00
Allan Odgaard
ba85697ac4 Change “counterpart” to “related file”
This applies both to the action method and the settings key, the latter is now relatedFilePath to indicate that it’s a full absolute path (neither relative or a glob pattern).
2013-07-21 13:25:27 +02:00
Allan Odgaard
e9acd16879 Move some Go menu items to Navigate menu
The Go to Symbol and Line are now in the Navigate menu, which means everything in the Go menu is about selecting a file or folder (for the file browser location).

The Navigate menu is about navigating around in the current file.

Also change menu item title “Go to Counterpart…” → “Go to Related File”
2013-07-21 13:25:27 +02:00
Allan Odgaard
0afa234ee6 Add new file types
This includes a new “braces” icon for use in the file browser, presently only used by ‘.go’ files.
2013-07-21 13:25:27 +02:00
Allan Odgaard
61bb49ad6e File browser icon bindings were semi-case-sensitive
We compared the lowercased extension or file name with the case-preserved entry in the bindings.plist file, meaning e.g. ‘Makefile’ never got the intended icon.
2013-07-21 13:25:26 +02:00
Grant Hollingworth
fa1f4254cb Remove obsolete help text for mate -n 2013-07-21 13:25:14 +02:00
Allan Odgaard
34f13d5837 If no counterpart is found, create tab with custom path
This way, if we specify that ‘*.go’ has a counterpart of ‘*_test.go’ but no test file exist (and no other files with same base name) then ⌥⌘↑ will create a new tab using the test file path as default save path.
2013-07-11 13:44:48 +02:00
Allan Odgaard
698f08ab35 Allow customizing what is used for ‘Go to File Counterpart’ (⌥⌘↑)
The user can now set ‘counterpart’ in .tm_properties to the absolute path of what should be used for ⌥⌘↑. If the file does not exist (on disk or as an open tab) then TextMate will fallback to searching the current folder for a file with same name.

To switch between go source and go test files one could add the following:

   [ *.go ]
   counterpart = "${TM_FILEPATH/(_test)?\.go$/${1:?:_test}.go/}"

Here the regular expression transformation will remove ‘_test’ from the file name if it exists, otherwise add it.

One could also do multiple settings like:

   [ *.go ]
   counterpart = "${TM_FILEPATH/(?=\.go$)/_test/}"

   [ *_test.go ]
   counterpart = "${TM_FILEPATH/_test(?=\.go$)//}"

Here ‘*.go’ files get the ‘_test’ added to their name, though files matched by the ‘*_test.go’ glob will instead have it removed.
2013-07-11 00:23:25 +02:00
Allan Odgaard
3198a8cdb1 Use weak pointer for block-accessed run loop
I am seeing some crashes related to this code. My best guess is that a command execution (with exit handler) is created and then cancelled from JavaScript, which would invoke the cleanup block that uses the (now destroyed, but non-nilled) run loop.
v2.0-alpha.9443
2013-07-02 18:43:46 +02:00
Allan Odgaard
115838949a Do not resolve broken symbolic links
Links that would point “above” the root (e.g. ‘/foo’ → ‘../../bar’) would cause an infinite recursion and eventually crash.
2013-07-02 18:43:46 +02:00
Allan Odgaard
33a47898e1 Remove revision field from version_info_t 2013-07-02 18:43:46 +02:00
Allan Odgaard
9adac35f86 Use complex version string during software update checks
While it is simpler to compare a monotonically increasing integer (the revision), we always use the semantic version string in the user interface, meaning that this version string should change together with the revision, which effectively means we are maintaing two version numbers.

We previously embedded the revision in the version string (2.0-alpha.$revision) but when going from alpha → beta, it would be nice to reset the visible counter, so that first beta becomes 2.0-beta.1, furthermore, test versions could benefit from a more descriptive version string, e.g. “2.0-alpha.9439.2+debug” would be the second (semi-public) debug build after “2.0-alpha.9439”.
2013-07-02 18:43:46 +02:00
Allan Odgaard
6c2ed2053d Trim version string received from server 2013-07-02 18:43:46 +02:00
Allan Odgaard
dc1a53aa38 Add code for comparing complex version strings 2013-07-02 18:43:46 +02:00
Allan Odgaard
8b696444c6 Invalidate bundle item (disk) cache when saving in bundle editor
Normally the cache is automatically invalidated via fs-events, but that is sadly unreliable.

Should fix #1034.
v2.0-alpha.9441
2013-06-29 12:42:34 +02:00
Allan Odgaard
ffc622c63d Deleting a bundle would only delete the contained info.plist 2013-06-29 12:42:34 +02:00
Allan Odgaard
598e80f06b Resolve path for a bundle item after it has been created
We may save to a symlinked path but generally always work with resolved paths (for cache lookups, fs-events, etc.).
2013-06-29 12:42:34 +02:00
Allan Odgaard
59a67be348 Handle creating a new bundle with name of existing bundle
Previously we would ensure that /path/to/info.plist inside the bundle was unique when we should have ensured that the actual bundle name was unique.
2013-06-29 12:42:34 +02:00
Allan Odgaard
2177645154 Checkin release notes v2.0-alpha.9439 2013-06-28 23:42:53 +02:00
Allan Odgaard
f88454b6ae Fix issue with remembering expanded file browser items
Previously each file browser would have its own array of expanded items, read from user defaults, and written back during application termination.

This meant that the last file browser to write its array, would eclipse the other file browsers.

Now we have all but the first file browser append its list of expanded items. Additionally each file browser will only append items which are actually visible.

Fixes #873.
2013-06-28 23:32:20 +02:00
Allan Odgaard
48339e306b Remove outdated “upgrade” code
We used to store selected URLs in the user defaults and added this code to remove potentially items.
2013-06-28 23:32:20 +02:00
Allan Odgaard
fd6e47b023 Let a document search clear the folder results used by ⌘G
If the user does a folder search then ⌘G will step through all the matches, opening documents as required. Previously the user would have to do a new search, using a different search string, to stop ⌘G from moving to a new document. It is now possible to stop the behavior using ⌘F followed by ↩.
2013-06-28 21:50:07 +02:00
Allan Odgaard
27e0abfa39 Add support for printing
Closes #517.
2013-06-28 19:32:56 +02:00
Allan Odgaard
c22ed7ce09 Make layout_t::update_metrics public 2013-06-28 17:21:11 +02:00
Allan Odgaard
eb1acfe70f Remove box_layout.h header (unused) 2013-06-28 08:42:06 +02:00