Commit Graph

459 Commits

Author SHA1 Message Date
Allan Odgaard
6272ea40e8 Remove release notes handling
This doesn’t really belong in the software update framework.
2012-09-29 00:20:38 +02:00
Allan Odgaard
98b4c07083 Add function to obtain bundle changes
This requires that the bundle contains a Changes.json.
2012-09-29 00:16:07 +02:00
Allan Odgaard
9f2a4c74da Add callback.document.will-save
Commands can prepare the document for saving in this callback, e.g. strip trailing whitespace (issue #35), ensure the line always has a newline character as the last byte in the document (issue #76), or similar.

Presently having a “will-save” command fail does not abort saving (but likely should). Also, there is no check to see if the command called requires the document to be saved before running, so that likely leads to an infinite loop.
2012-09-27 17:52:41 +02:00
Allan Odgaard
e1dd99a0f5 Add window to “document will save” notification
The text view needs to do a little work before saving a document (serialize folded text) and with the window as part of the user data, we can now skip that for text views in windows for which documents are not going to be saved.

This is not an ideal solution; long-term saving will be moved up to the DocumentWindowController which has the full view of all documents and text views.
2012-09-27 17:52:41 +02:00
Allan Odgaard
cf62b6e92b Improve error text for missing shell commands 2012-09-27 17:52:41 +02:00
Allan Odgaard
ea85d37dff Use literal ‘⇥’ instead of ‘\u21E5’ 2012-09-27 17:52:41 +02:00
Allan Odgaard
e1fc3993f0 Improve editor performance when file browser show lots of stuff
Delays may still be experienced when a file is opened or its “modified” state is changed but general edits should no longer be affected by how much is showing in the file browser.

This addresses issue #463.
2012-09-26 00:26:01 +02:00
Allan Odgaard
e958a04945 Potentially resize gutter when bounds change 2012-09-25 22:06:16 +02:00
Allan Odgaard
e969b4cade Hide OakControl implementation 2012-09-25 16:18:08 +02:00
Allan Odgaard
a9412d7920 Minor change to tab bar view properties
We now set the isExpanded property during initialize and use a property to reflect the current user preference for wether or not to collapse when there is just one tab.
2012-09-25 16:18:08 +02:00
Allan Odgaard
695ee00b3b Remove binding support from OakTabBarView
Initially this was used but I found that a data source approach worked better, as it made things more explicit (and this easier to follow).
2012-09-25 16:18:08 +02:00
Allan Odgaard
2edf3bb56e Add comments translating code points 2012-09-25 16:18:08 +02:00
Allan Odgaard
71c1febc34 Constrain gutter view’s top to that of the text view
This might be what’s causing the gutter view to sometimes be shorter than the text view, although it’s merely a hunch.
2012-09-25 16:18:01 +02:00
Allan Odgaard
a0c4af64bd Remove trailing whitespace
Only removed from non-empty lines.
2012-09-25 14:16:50 +02:00
Allan Odgaard
983bce86aa Use @autoreleasepool blocks 2012-09-25 12:30:12 +02:00
Allan Odgaard
7df336664a Add set_basic_environment
This is in cases where we don’t want the “clean” environment setup by default.
2012-09-24 21:32:29 +02:00
Ole Gammelgaard Poulsen
ca25560f19 Added tm_query CLI that returns settings and variables for a file 2012-09-24 21:32:29 +02:00
Allan Odgaard
4ed34392d6 Use synthesized instance variables 2012-09-24 21:15:47 +02:00
Allan Odgaard
c3de1a09f5 Move code out of header 2012-09-24 20:58:43 +02:00
Allan Odgaard
962bf5149b ARC: Update HTMLOutputWindow framework 2012-09-24 20:58:43 +02:00
Allan Odgaard
45d38ff6c8 Use synthesized instance variables 2012-09-24 20:58:43 +02:00
Allan Odgaard
7e53c15b67 ARC: Update layout framework (tests) 2012-09-24 20:58:43 +02:00
Allan Odgaard
426b3d1257 ARC: Update CrashReporter framework 2012-09-24 20:58:42 +02:00
Allan Odgaard
596bd65140 ARC: Update BundleMenu framework 2012-09-24 20:58:42 +02:00
Rasmus Abrahamsen
ccc0b414bb Fix “replace selected” for Find All in document
Fixes issue #77.
2012-09-24 20:58:42 +02:00
Mads Hartmann Jensen
adec6e4184 Incremental search keybindings
You can now use CTRL+S and CTRL+SHIFT+S to jump forwards/backwards
in the incremental search results
2012-09-24 20:58:42 +02:00
Mads Hartmann Jensen
c2eee4578f Made the Live Search view prettier 2012-09-24 20:58:42 +02:00
Rasmus Abrahamsen
443421be84 Fix CRLF issue #409. 2012-09-24 20:58:41 +02:00
Allan Odgaard
9d97fdfdb0 Find in Folder: Add failing CRLF test 2012-09-24 20:58:41 +02:00
Allan Odgaard
0cea361b00 Explicit timer invalidation 2012-09-22 13:23:41 +02:00
Allan Odgaard
56b96e7f07 ARC: Update OakFoundation framework 2012-09-22 13:23:41 +02:00
Allan Odgaard
02ab2e858a Local key bindings no longer eclipse the default set 2012-09-21 20:32:31 +02:00
Allan Odgaard
bae6270d6c Add indent aware begin/end of line action methods
The methods going to “begin of indented line” will go to the first non-whitespace character on the line, unless the caret is already there or to the left of this character, in which case it will go to the actual beginning of the line.

The “end of indented line” methods work similarly.

If you want [⇪]⌘⇠/⇢ and ⌘⌫/⌦ to use this behavior, you can add the following to your key bindings file:

	"@\UF702"  = "moveToBeginningOfIndentedLine:";
	"$@\UF702" = "moveToBeginningOfIndentedLineAndModifySelection:";
	"@\UF703"  = "moveToEndOfIndentedLine:";
	"$@\UF703" = "moveToEndOfIndentedLineAndModifySelection:";
	"@\U007F"  = "deleteToBeginningOfIndentedLine:";
	"@\UF728"  = "deleteToEndOfIndentedLine:";
2012-09-21 20:29:58 +02:00
Allan Odgaard
13f35bd5b1 Whitelist rather than blacklist inherited variables
Initially the environment was clean but it was found that some variables should be inherited, e.g. SSH_AUTH_SOCK.

Therefor a blacklist was introduced, but it seems futile trying to keep it updated with all the variables that may affect the behavior of commands executed from within TextMate, therefor we now use a whitelist.

Probably the whitelist should be user configurable as launchd uses environment variables to communicate dynamically allocated sockets (like SSH_AUTH_SOCK, but there are also some Apple-prefixed variables pointing to named sockets).

Issue #238.
2012-09-21 17:50:52 +02:00
Allan Odgaard
9f339bbae1 Fix thread related crash
Since the std::map hosting the basic environment was using a (function local) static initializer, it would be destroyed during exit — though there might be threads using the basic environment, and joining these might happen after destroying the basic environment.

This should explain the crash in network::launch_tbz.
2012-09-21 17:50:52 +02:00
Allan Odgaard
a1a5569ae6 Don’t select implicit padding
For example moving the selection often require padding to be inserted, previously this padding would become part of the selection.

This fixes issue #72.
2012-09-21 16:24:43 +02:00
Allan Odgaard
e4ea7834c1 Refactoring 2012-09-21 16:24:43 +02:00
Allan Odgaard
057f07448f Fix “move selection” for east asian scripts
Since it moves one column left/right and east asian scripts have their glyphs count as two columns, it would effectively move half a column, which in practice would be done by inserting a space.

Fixes issue #469.
2012-09-21 16:24:43 +02:00
Allan Odgaard
86461a30b7 Add flag to ignore east asian width 2012-09-21 16:24:42 +02:00
Allan Odgaard
3f012ff11c Recent menu ignores files created with “New Tab” 2012-09-21 16:24:42 +02:00
Allan Odgaard
fbbe4ddac7 Cap line number when requesting info from layout
With the new constraint based layout, the gutter can issue line record requests before the layout has been updated to hold the new document buffer.
2012-09-21 16:23:35 +02:00
Allan Odgaard
8ea658b3cf Command-clicking single caret could lead to crash
Command-clicking an existing caret normally toggles, unless there only is a single caret, in which case it adds a caret. This would thus allow you to add a new caret sharing the position of the existing, and command-clicking again would then remove both the two existing carets, leading to an assertion failure (as there were no carets).

Fixes issue #466.
2012-09-21 16:23:35 +02:00
Allan Odgaard
a3cae448b1 fixup! Use Objective-C for…in instead of macro 2012-09-21 16:23:35 +02:00
Allan Odgaard
6afa7601c0 Provide utf16::advance with range end
There are several crashes reported from firstRectForCharacterRange: which indicate that the system may ask for indexes “out of range”, hence why we now effectively just cap such request.
2012-09-21 01:32:41 +02:00
Allan Odgaard
56ec46e1f9 fixup! Avoid using objc_ptr 2012-09-21 01:32:41 +02:00
Allan Odgaard
0f3861fec7 Retire custom begin/endof functions
We can now use std::begin/end although for containers we explicitly call the member functions.
2012-09-20 12:22:21 +02:00
Allan Odgaard
c7971c5f63 Use range-based for instead of std::for_each 2012-09-20 12:22:21 +02:00
Allan Odgaard
d06bd877e2 Avoid using begin/endof with ng::ranges_t 2012-09-20 12:22:21 +02:00
Allan Odgaard
d71b9ea324 Avoid using begin/endof with strings
Mainly this is just to phase out the use of these custom helpers.
2012-09-20 12:22:20 +02:00
Allan Odgaard
ebab500ba3 Use std::map/set instead of C arrays
These types come with a find() method and avoids having to use helper functions to get the begin/end of the array (for linear search).
2012-09-20 12:22:20 +02:00