Commit Graph

1615 Commits

Author SHA1 Message Date
Allan Odgaard
b386c0b335 Checkin release notes v2.0-alpha.9423 2013-05-17 16:19:26 +07:00
Allan Odgaard
126ff16b58 Increase TextMate’s lifetime
We now warn 45 days after the compilation date and refuse to work 90 days after the compile date.
2013-05-17 16:18:22 +07:00
Allan Odgaard
03d72414f3 Specify that dependency files are ‘gcc’ (for ninja 1.3.0) 2013-05-17 15:31:14 +07:00
Allan Odgaard
e0523bb926 Improve encapsulation 2013-05-16 21:36:49 +07:00
Allan Odgaard
eb6b0541b2 Move reader_t and process_t to command framework
These are now only used by the command framework and should soon be retired.
2013-05-16 21:36:49 +07:00
Allan Odgaard
ffb900deb1 Add missing include 2013-05-16 21:36:49 +07:00
Allan Odgaard
b747dc662b Delete cf::run_loop assignment/copy constructor
They were previously declared private, as they weren’t implemented and we can’t use generated versions.
2013-05-16 21:36:49 +07:00
Allan Odgaard
03aea09148 Use io::spawn instead of oak::command_t for TextMate.system
Like with snippets, we no longer support executing a shebang-script given “inline” — though this was never a documented feature and I am not aware of anything having made use of it.
2013-05-16 21:36:49 +07:00
Allan Odgaard
b6fce5fe30 Check if command result is valid UTF-8
This was previously implicit by using oak::command_t
2013-05-16 21:36:43 +07:00
Allan Odgaard
28ab42bff9 Remove oak::command_t 2013-05-16 21:36:07 +07:00
Allan Odgaard
714779d89b Use io::spawn instead of oak::command_t with snippets
Since we now run the shell code directly (via ‘/bin/sh -c «command»’) we no longer source ‘TM_SUPPORT_PATH/lib/bash_init.sh’.

I don’t think any code embedded in snippets rely on things setup by this file, but if they do, I’d prefer we update the snippets to explicitly source the file.
2013-05-16 21:36:00 +07:00
Allan Odgaard
a2e7de29e7 Add missing include 2013-05-16 21:29:59 +07:00
Allan Odgaard
7dbb02652f Use io::spawn instead of oak::command_t for /usr/bin/diff3 2013-05-16 21:29:35 +07:00
Allan Odgaard
598c3b7a89 Allow completion commands to have requirements 2013-05-15 22:58:06 +07:00
Allan Odgaard
e3bc6e982b Introduce editor_delegate_t
This is to avoid having editor_t hold a document_t.
2013-05-15 22:38:02 +07:00
Allan Odgaard
e80e9c5172 Remove private methods from header 2013-05-15 21:23:15 +07:00
Allan Odgaard
7f88fcbdf3 Fix problem with opening multiple empty files on FAT file systems
The problem is that empty files on a FAT file system all have the same inode so TextMate would consider them to be links of each other and only show the last one opened.

Fixes #979.
2013-05-15 16:17:06 +07:00
Allan Odgaard
0795b89bdb Clicking already selected search result reselects the match
Previously we ignored clicks and only selected matches when the selection was changed. This was done to prevent firing off two “select match” actions. We now ignore the “selection changed” notification if the current event is a mouse-up.
2013-05-15 15:45:36 +07:00
Allan Odgaard
a366a5f9fe Move grammar changed callback from document → buffer 2013-05-15 15:45:36 +07:00
Allan Odgaard
adf52e1ab2 Forward grammar changes to text view 2013-05-15 15:45:36 +07:00
Allan Odgaard
58dc0b0491 Remove path::walker_t
The intent of this class was to allow ad-hoc recursive/lazy walking of a directory structure and having links only visited once.

It was however only used once, and for that task, path::entries() is sufficient.
2013-05-15 15:45:36 +07:00
Allan Odgaard
6e4926177e Provide symmetric content/set_content for document_t 2013-05-15 15:45:36 +07:00
Allan Odgaard
6aa871576f Don’t read user settings from file::path_attributes
The reason for this is mainly that the path given to path_attributes() might be a virtual path, in which case using that to obtain settings can cause problems. For example if the (virtual) path is ‘/net/some/long/path’ (rmate) then we’ll hit that path locally, but stat’ing paths under /net can take seconds.

Also, the ‘scopeAttributes’ read from the user settings isn’t technically path attributes. Though the feature this allows is that we can scope the encrypt/decrypt export/import commands to ‘attr.enable-encryption’ and then put something like this in a project’s .tm_properties:

    [ private/** ]
    scopeAttributes = "attr.enable-encryption"
2013-05-15 15:45:36 +07:00
Allan Odgaard
f956ba905f Move path_variables function to where it is used 2013-05-15 15:45:36 +07:00
Allan Odgaard
cbe937d3f3 Convert CFURL → std::string in plist::convert
This is mainly for debugging purposes (printing a CFDictionary).
v2.0-alpha.9421
2013-05-13 18:10:47 +07:00
Allan Odgaard
66b8ab54f9 Rewrite proxy code
We now use CFNetworkCopyProxiesForURL() to get the list of potential proxies, hopefully this will perform the proper “proxy auto discovery” (issue #973) though we still need to handle PAC ourself.

Presently we only use the first proxy found, ideally we would try them all (but this will require some API changes).
2013-05-13 18:08:35 +07:00
Allan Odgaard
f5c63828ee Remove path attributes from document_t 2013-05-12 23:04:57 +07:00
Allan Odgaard
61b8c844a5 fixup! Handle “did-save” bundle item callback in OakTextView 2013-05-12 22:48:46 +07:00
Allan Odgaard
91901bfdd3 Call bundleItemPreExec:… from command execution
This is instead of having a copy of the same code. Ideally command execution would be called after potential pre-exec stuff, but macro execution is presently handled by editor_t which doesn’t have access to the higher level stuff.
2013-05-12 11:09:18 +07:00
Allan Odgaard
e5cca3de18 Remove ‘document_settings’ API 2013-05-12 11:09:18 +07:00
Allan Odgaard
35ffdd5dd8 Don’t setup basic environment in ‘variables_for_path’
We expect the caller to pass us a properly setup environment.
2013-05-12 11:09:18 +07:00
Allan Odgaard
bf7d657eef Move some TM variables to oak::basic_environment 2013-05-12 11:09:18 +07:00
Allan Odgaard
ec9208afa9 Use whitelist feature to preserve dialog variables 2013-05-12 11:09:18 +07:00
Allan Odgaard
ce4ae62547 Change ‘variables_for_path’ API
We now accept the a directory in addition to the path. If a directory is provided, the path is only used to filter variables rooted at the directory.
2013-05-12 11:09:18 +07:00
Allan Odgaard
77a6dcebfe Remove unused typedef 2013-05-12 11:09:17 +07:00
Allan Odgaard
8b3f05485d Change argument ordering for ‘scope_variables’
Generally we should always provide a base environment, since the scoped variables are format strings. The filtering scope selector is however optional, and we do not have one when executing commands outside an fi;e/editor context.
2013-05-12 11:09:17 +07:00
Allan Odgaard
5eaa0a9d94 Remove “PWD API” for setting command working directory
Only the file browser and the ‘path_variables’ function (used for filters) made use of this method to set the working directory. Previously drop commands also used it, which is probably the only time we really need to set a working directory, as we provide the command with a relative file path.
2013-05-12 11:09:17 +07:00
Allan Odgaard
10e3536a80 Change method signature
We return a variables map instead of updating a map passed in by reference. The previous API was mainly done because we couldn’t previously return non-POD from Objective-C methods. Returning a map with variables makes the API more exact, e.g. how to handle existing entries is no longer an issue (that is, the caller will have to chose the appropriate duplicate strategy).
2013-05-12 11:09:17 +07:00
Allan Odgaard
4a32881c11 Remove legacy variable functions 2013-05-12 11:09:17 +07:00
Allan Odgaard
d669c9733b Do not setup variables in document::run 2013-05-12 11:09:17 +07:00
Allan Odgaard
02f688a525 Explicit variable setup for app controller commands 2013-05-12 11:09:17 +07:00
Allan Odgaard
985a3c1d92 Explicit variable setup for file browser commands 2013-05-12 11:09:17 +07:00
Allan Odgaard
1d1ce8e234 Explicit variable setup for completion commands 2013-05-12 11:09:16 +07:00
Allan Odgaard
12491e22f8 Let OakTextView set TM_CURRENT_THEME_PATH
Previously we relied on the delegate to set this, but a text view may not have a delegate. One could however argue that this is a “global” setting so should be set even when there is no text view.
2013-05-12 11:09:16 +07:00
Allan Odgaard
9b4734bf98 Explicitly collect variables from different components 2013-05-12 11:09:16 +07:00
Allan Odgaard
f02a68893d Don’t pass base environment to bundle_variables 2013-05-12 11:09:16 +07:00
Allan Odgaard
58cfa20a1b Add operator<< for std::map
This is to allow chaining inserts and to avoid temporary variables when inserting maps returned from functions.
2013-05-12 11:09:16 +07:00
Allan Odgaard
92192341d4 Let OakTextView pass an environment to document::run()
We no longer pass the bundle item by const-reference because it is now used (delayed) in a block and const-references are not captured by blocks (i.e. the lifespan is not extended).
2013-05-12 11:09:16 +07:00
Allan Odgaard
a6cf964e9f Remove callback support from document::run 2013-05-12 11:09:16 +07:00
Allan Odgaard
421a46d116 Rework setup/execution of drop commands
We now collect all variables (and working directory) prior to calling document::run() to remove the need for a callback.
2013-05-12 11:09:16 +07:00