Commit Graph

1460 Commits

Author SHA1 Message Date
Allan Odgaard
c080bd8f8b Add storage access info to crash reports 2013-08-10 13:43:59 +02:00
Allan Odgaard
f008c49dab Dispose tree structure bottom-up to limit stack usage
With really long search strings, the recursive disposal of nodes would blow the stack
2013-08-10 13:14:55 +02:00
Allan Odgaard
231f1f8160 Improve application specific data in crash log
This makes it easier to automatically extract and index.
2013-08-10 11:55:39 +02:00
Allan Odgaard
7fa1d96faa Fix crash when “close tabs” is sent to window with no tabs
It appears a window can hang around after its last tab has been closed. Such window receive notifications of items being deleted via the file browser, and will call the “close tabs” method in response to these, which does an out-of-range array access if no tabs exist.

The reason for why windows can hang around after last tab is closed has not yet been determined. It might be a retain cycle (bug) or a delayed release due to autorelease pools.

Fixes #1064
2013-08-10 11:41:40 +02:00
Allan Odgaard
f17f49e95d Spelling suggestions can be chosen with 1-n 2013-08-10 00:51:27 +02:00
Allan Odgaard
21d68ce336 Fix file browser menu item validation 2013-08-09 23:21:21 +02:00
Allan Odgaard
e9576e60f9 Let transpose detect and swap words
The detection is done by a regexp match of ‘\w+\W+\w+’ allowing the string to optionally be wrapped in round, square, or squiggly parentheses.
2013-08-09 23:13:58 +02:00
Allan Odgaard
d311405af0 Harmonize code
We effectively do the same thing 5 different places, so good if the code is identical (incase it needs to be revised).
2013-08-09 22:20:23 +02:00
Allan Odgaard
5e5bbc468f Revert "The 10th tab now get ⌘0 as key equivalent"
This commit made the 11th tab get ⌘1 as key equivalent. Fixes #1078.

This reverts commit 5e6cfe8e1e.
2013-08-09 21:56:02 +02:00
Allan Odgaard
00c5f8531e Make outlineView:shouldExpandItem: a no-op for expanded items
Fixes #160.
2013-08-09 21:54:12 +02:00
Allan Odgaard
1c783fede9 Use implicitly synthesized properties 2013-08-06 15:00:04 +02:00
Allan Odgaard
1d4358fac6 Remove unused include 2013-08-05 18:55:43 +02:00
Allan Odgaard
97ad8294a6 Initialize shared spell checker during setup
The first time we ask for the shared spell checker it does some setup involving AppKit (creating the shared spelling panel?). While we already ensure that the spell checker is only called from the main queue, it seems this setup code must run on thread 0, which, when we are not in a Cocoa application, is not necessarily the thread used for the main queue.
2013-08-05 18:55:43 +02:00
Allan Odgaard
82e7749546 Explicitly run libcurl’s global init function
This function is not thread safe so we should not have it implicitly called, as we generally do not call the libcurl functions from the main thread.
2013-08-04 22:18:30 +02:00
Allan Odgaard
cd8b554b59 Ensure NSSpellChecker methods are called from main queue
I have been told that the spell checker should be thread safe (except for the spelling panel) but after moving to concurrent execution of the integration tests, several segmentation faults have pointed toward the spell checker not being thread safe.
2013-08-04 22:15:34 +02:00
Allan Odgaard
993bcaa26f Fix assertion (off-by-one) 2013-08-04 19:40:36 +02:00
Allan Odgaard
f4828036fe Preserve document’s scroll offset when changing soft wrap or font
Technically we preserve which line is the first visible.

Fixes #993.
2013-08-04 15:18:40 +02:00
Allan Odgaard
faf30e4786 Update document dimensions before restoring scroll position
Since the document starts out the same width as the view port, horizontal scroll position was effectively never restored, fixes #605.
2013-08-04 14:40:27 +02:00
Allan Odgaard
2c0010a141 Restore “first visible character” instead of visible rectangle
This is when switching tabs ore re-opening a file.

Restoring the visible rectangle doesn’t always work because we do an initial heuristic layout where we don’t do proper soft wrap and may also lack scoped settings to increase font size for headings, meaning that the restored visible rectangle does not point to the same section of the text, as it would with a fully updated layout.

This fixes #243.
2013-08-04 14:36:45 +02:00
Allan Odgaard
d9b446dcc2 Update some use of the iterate macro to for(… : …) 2013-08-03 17:44:30 +02:00
Allan Odgaard
c460535cf7 Add some debug output to layout_t 2013-08-03 17:30:13 +02:00
Allan Odgaard
3c1fe38190 Use a capturing lambda function instead of global variable
The code involved is only for debug output.
2013-08-03 17:25:42 +02:00
Allan Odgaard
c7764b8b14 Deleting trailing newline for line with foldings would misbehave
Here misbehave means unfold the folded text (on the same line) but as a single line.

Fixes #257
2013-08-03 17:18:53 +02:00
Allan Odgaard
560f2ce110 Inserting newline at start of line with foldings would misbehave
Here misbehave means unfolding the folded text on a single line.

Fixes #933
2013-08-03 16:59:15 +02:00
Allan Odgaard
ee10f79ed4 Fix non-retaining Objective-C property
The ‘lastVersionDownloaded’ property used ‘assign’ (since it used to be an integer) which meant TextMate would likely crash when the property was read (and had a non-nil value), which it would, when TextMate did a version check after already having downloaded an update (but not yet installed and relaunched).

Also drop the atomic requirement of the ‘archive’ property since we no longer access it from multiple threads.
2013-08-03 11:54:52 +02:00
Allan Odgaard
8d51e930e3 Ensure version_less(NULL_STR, «any») → true 2013-08-02 16:21:21 +02:00
Allan Odgaard
62a16dd6a9 Do recursive rescan of updated bundles
Previously we would rescan the parent path which was effectively a no-op.

Also pass the “recursive” flag from fs-events to cache_t::reload.
2013-08-02 15:30:48 +02:00
Allan Odgaard
171cf05981 Use cache_t::erase when uninstalling a bundle 2013-08-02 15:26:59 +02:00
Allan Odgaard
20cea4ef4f Make cache_t::erase also remove descendants 2013-08-02 15:24:29 +02:00
Allan Odgaard
9fd20df7b6 Remove code to cleanup old cache files 2013-08-01 22:33:19 +02:00
Allan Odgaard
612d8735ee Rename test header extension: .cc → .h 2013-08-01 19:08:15 +02:00
Allan Odgaard
281f5075e1 Update OakAppKit tests for new conventions 2013-08-01 19:05:39 +02:00
Allan Odgaard
a8e677db3c Update testing system for ns framework 2013-08-01 19:03:31 +02:00
Allan Odgaard
84dc2dd871 Allow a target to use both new and old test system
Presently the new test system cannot be used for (interactive) GUI tests, so we keep the old one until we have that feature in the new.
2013-08-01 19:01:24 +02:00
Allan Odgaard
c2749b0719 Bump version of bundle cache format
The cache update code has an issue causing some users to get an incomplete view of what’s on disk. Bumping the version forces re-indexing, and is not a long-term fix.
2013-08-01 11:36:27 +02:00
Allan Odgaard
f0bd118738 Update build (generator) script
Use APP_VERSION instead of APP_REVISION in various target names.

Indicate a few build commands are generators, so that their output is not removed on ‘ninja -t clean’.

Move generated dummy files (for tagging, uploading, deploying, etc.) to sub-directories to reduce noise in build directory.
2013-08-01 11:36:27 +02:00
Allan Odgaard
7e1242b26f Improve handling of zero-width search results
Previously when using find next/previous and the caret was already on a zero-width match position, TextMate would stay on this match.
2013-07-31 20:58:10 +02:00
Allan Odgaard
267471d7bb Account for multi-byte characters when moving search position
Fixes #1070
2013-07-31 20:24:16 +02:00
Allan Odgaard
9072ba8d26 Collect info related to potential crash 2013-07-31 18:42:31 +02:00
Allan Odgaard
afcba9b1e8 Collect info related to a crash 2013-07-31 17:55:24 +02:00
Allan Odgaard
bbde9b61c3 Improve ability to aggregate info in crash reports 2013-07-31 17:52:32 +02:00
Allan Odgaard
9eda1a473b Remove path::identifier_t 2013-07-30 15:44:18 +02:00
Allan Odgaard
1d4d3bd3d3 Fix path/inode lookup when opening documents
The strategy is to prefer an existing document with same path and if there is none, check if there is a document with the same inode. The latter is so that links or files that have been moved, do not create duplicate documents.

The old code used a single map for the lookup, using path::identifier_t as key (wrapping path and/or inode), though since the map is ordered, the code would occasionally fail, as the keys cannot be correctly ordered (so effectively this reworked code is a fix for an incorrect path::identifier_t::operator<).

Fixes #1052.
2013-07-30 15:34:17 +02:00
Allan Odgaard
a4a2af726a Use std::mutex instead of OSSpinLock 2013-07-30 15:34:17 +02:00
Allan Odgaard
e0e7059500 Limit use of path::identifier_t 2013-07-30 15:34:17 +02:00
Allan Odgaard
b09d1974ea Improve speed of stopping the document scanner
Closes #1069.
2013-07-29 16:24:29 +02:00
Allan Odgaard
0a64d372a9 Improve lstat error message 2013-07-29 16:07:33 +02:00
Allan Odgaard
24bd109ccc Store tab size with backups 2013-07-29 16:06:15 +02:00
Allan Odgaard
c69112dbe3 fixup! Account for svn returning relative paths
Turns out the paths are relative to the current working directory, not the working copy.
2013-07-29 15:50:31 +02:00
Allan Odgaard
05efb628b4 Setup indent settings at a higher level
We now setup the indent settings when creating untitled documents where we know the folder, so that we can use potential settings scoped to that folder.

Since the document itself no longer sets this as part of regular buffer setup, we also set it when opening a document with a path, and when changing a document’s file type, although the latter is probably temporary.

Closes #305.
2013-07-29 15:50:31 +02:00