Commit Graph

1387 Commits

Author SHA1 Message Date
Allan Odgaard
7a00c45448 Checkin release notes v2.0-alpha.9395 2013-03-13 14:17:05 +01:00
Allan Odgaard
34bf85d8d1 Remove whitespace when shifting text left
Previously shifting text left/right would ignore blank lines (as noted in issue #419).

When shifting left though it does make sense to delete whitespace, especially as the same code is used to re-indent when pasting.

Fixes #810.
2013-03-13 12:38:12 +01:00
Allan Odgaard
0075b46c82 Introduce zeroIndentPattern
This will give the matched lines zero indent but without affecting the following lines.

Probably the only use-case for this is C preprocessor directives.
2013-03-13 12:38:12 +01:00
Allan Odgaard
d16f3bcc1e Use per-line indent patterns when estimating indent
This solves the problem where we need to estimate the current line’s indent, but the lines above it is a multi-line block comment. Previously we would fetch indent patterns based on the current scope, then find the first line above caret, for which the patterns can be used to estimate the indent. The problem is that the commented lines without comment markers would be treated as code, and used for the indent.

With the new approach, we can set different patterns for ‘comment.block’ (the C bundle already does this), which basically ignore all the lines, which will cause TextMate to use the code above the comment to estimate indent.

This commit closes textmate/c.tmbundle#3 and also closes textmate/php.tmbundle#24.
2013-03-13 12:38:12 +01:00
Allan Odgaard
77a07aedc7 Let TM_MATE point to ‘mate’
This command is used by a lot of commands, so it makes sense to have a dedicated variable for its location.
2013-03-13 12:38:12 +01:00
Allan Odgaard
b5eb83d383 Refactor code 2013-03-13 12:38:12 +01:00
Allan Odgaard
d8cf1e3591 Gather UI construction code and harmonize fonts 2013-03-13 12:38:11 +01:00
Allan Odgaard
9f8b7bf27c Improve layout constraints for labels
The widest should now be exactly 20 pixels from the window’s left border, and the others are right-aligned with this label.
2013-03-13 12:37:23 +01:00
Allan Odgaard
b5136bcdc7 Set window’s defaultButtonCell
This is instead of setting the key equivalent to ‘\r’ for the button that should be default.
2013-03-13 12:37:22 +01:00
Allan Odgaard
c44e85f258 Avoid delayed window resize 2013-03-13 12:37:22 +01:00
Allan Odgaard
7acf168904 Keep title and enabled state of Replace All button updated 2013-03-13 12:37:22 +01:00
Allan Odgaard
f553f20cc7 Change criterion for focusing find string when dialog is open
We now move focus to the find string unless the window is visible, key, and focus is already in a text field (technically an NSTextView).
2013-03-13 12:37:22 +01:00
Allan Odgaard
db5df4a58c Update Find window API 2013-03-13 12:37:22 +01:00
Allan Odgaard
4b5db02a44 Remove Find in Selection menu item
This item had no key equivalent and the find dialog automatically uses “selection” if the current document has a multi-line selection, so I don’t see any need for this menu item.

Also removed the key equivalent for “Find in Folder…” — the key equivalent wasn’t memorable and I don’t see a big need for this item, since one can initiate searches from the file browser.
2013-03-13 12:37:22 +01:00
Allan Odgaard
d18b30f280 Remove oak::lock_t and oak::mutex_t 2013-03-13 12:37:21 +01:00
Allan Odgaard
c3e9fc1b0e Change oak::mutex_t → std::mutex (C++11) 2013-03-13 12:37:21 +01:00
Allan Odgaard
f0efe600e4 Remove Edit → Select → None
This can now instead be found in the file browser’s action menu, as it (by design) only works on the file browser, not the text view.

Closes #883.
2013-03-12 10:25:04 +01:00
Allan Odgaard
b1e9476cce Add Select None to file browser’s action menu
This makes it easier for the user to discover that ⇧⌘A can be used to deselect all (useful e.g. prior to running a SCM command).
2013-03-12 10:25:04 +01:00
Allan Odgaard
df512d98fa Remember height of find in folder results 2013-03-12 10:25:04 +01:00
Allan Odgaard
5013620a89 Fix exception when renaming to empty string
Fixes #887.
2013-03-11 22:24:55 +01:00
Allan Odgaard
fcbaacdfe9 Set default encoding to UTF-8
Although everything would still default to UTF-8, the initial title of the pop-up in Preferences would show a wrong value.

Fixes #889.
2013-03-11 22:18:18 +01:00
Allan Odgaard
c561d2447b Add UI setting for disabling auto-resize
The auto-resize is when toggling the file browser.
2013-03-11 17:48:20 +01:00
Allan Odgaard
cceff2cb99 Clear previous frame when switching side of file browser 2013-03-11 17:28:34 +01:00
Allan Odgaard
514f65bcb5 Improve window sizing when toggling file browser
The first time the browser is toggled, we’ll save the current frame so that we can restore it if the user toggles again (the calculated frame won’t match when window is moved or width is “truncated”).

Additionally when file browser is on the left side, we reframe the window so that the text view remains in the same place on the screen.

Closes #827.
2013-03-11 17:24:41 +01:00
Allan Odgaard
00d381ec5f SCM drivers can return arbitrary variables
These variables are mainly for use in the window title. Not all variables make sense across SCM drivers, hence why it is now completely up to the driver, what variables it provides.
2013-03-11 16:14:44 +01:00
Allan Odgaard
ce537a4ef9 Prefix error message with result from getprogname() 2013-03-11 16:11:39 +01:00
Allan Odgaard
46fc5430c7 Remove Objective-C smart pointer
Not necessary now that we have ARC.
2013-03-10 16:11:26 +01:00
Allan Odgaard
96784e9fee ARC: Update OakAppKit framework 2013-03-10 16:11:26 +01:00
Allan Odgaard
694b670413 Remove OakStatusBar 2013-03-10 16:11:26 +01:00
Allan Odgaard
48923b9eee Remove unnecessary include 2013-03-10 16:11:25 +01:00
Allan Odgaard
2b0acf9677 Remove isDark NSColor category method 2013-03-10 16:11:25 +01:00
Allan Odgaard
e6e281cae9 Only disable ARC for MGScopeBar vendor target 2013-03-10 16:11:25 +01:00
Allan Odgaard
e144ce594f Update MASPreferences submodule 2013-03-10 16:11:25 +01:00
Allan Odgaard
aa35578c99 Make s/w update tests concurrent 2013-03-10 16:07:11 +01:00
Allan Odgaard
24f6f3bd2c Use posix_spawn instead of fork/exec
Using Apple’s POSIX_SPAWN_CLOEXEC_DEFAULT appears to be the only safe way to spawn a child process in a multi-threaded program.
2013-03-10 16:07:11 +01:00
Allan Odgaard
f69ac60b0c Limit file descriptors passed to child process
Instead of passing the file descriptor to the child, and have the child close it, we set FD_CLOEXEC on the file descriptor in the parent process.

While it limits the window in which another thread can fork() and cause the file descriptor to be “leaked”, it doesn’t eliminate the problem.
2013-03-10 16:07:10 +01:00
Allan Odgaard
13edc6d131 Use O_CLOEXEC when opening files
This avoids leaking file descriptors into child processes, which would otherwise happen if another thread forks while the file descriptor is open.
2013-03-10 16:07:10 +01:00
Allan Odgaard
94e7624224 Setup git-dir and work-tree for git 2013-03-10 16:07:10 +01:00
Allan Odgaard
742192bf01 Provide svn with path to repository 2013-03-10 16:07:10 +01:00
Allan Odgaard
6b3dcc415f Use --cwd when calling hg
This way we avoid changing the process’ working directory.
2013-03-10 16:07:10 +01:00
Allan Odgaard
4dada34bde Make network tests concurrent 2013-03-10 16:07:10 +01:00
Allan Odgaard
090a6ac698 Increase queue size for test (web) server
With concurrent tests and sequential handling of requests, the queue size is likely to grow to “number of concurrent tests”.
2013-03-10 16:07:10 +01:00
Allan Odgaard
be65671e52 Fix shell quoting for selected files
There would be a pair of redundant single quotes after each quoted path.
2013-03-10 16:07:09 +01:00
Allan Odgaard
710e4ffad0 Remove unused tbz (download) filter 2013-03-10 16:07:09 +01:00
Allan Odgaard
d92a4ee286 Range check for ⌘1-n should include ⌘0 2013-03-10 16:07:09 +01:00
Allan Odgaard
59fb3bc1a9 The ⌘1-n keys wouldn’t always work in find dialog 2013-03-10 14:34:44 +01:00
Allan Odgaard
53d1928b9d Update buffer tests
Mainly improving function names including appropriate prefix for benchmark functions so that they are picked up by the new test system.
2013-03-10 14:34:44 +01:00
Allan Odgaard
e3e643468f Use constructor function instead of class 2013-03-10 14:34:44 +01:00
Allan Odgaard
ca91ce58c6 Add options to generated test executable
The current options are:

 -b/--benchmark   Run benchmarks instead of tests.
 -m/--measure     Measure time of each test. This disables concurrency.
 -r/--repeat <n>  Number of times to repeat each test/benchmark.
 -v/--verbose     Be verbose.
 -h/--help        Show this help.
 -V/--version     Show version number.
2013-03-10 14:34:44 +01:00
Allan Odgaard
99969996c5 Ensure test assertions are only evaluated once 2013-03-10 14:34:43 +01:00