Commit Graph

159 Commits

Author SHA1 Message Date
Allan Odgaard
9366a1ec50 Cache image resources
This was also done prior to commit 806cb44. I just assumed that now that we are back using the system’s named image stuff, we would benefit from their cache, but clearly we are not (especially file browser seemed sluggish because of (re)loading the file type images).
2012-08-19 14:44:57 +02:00
Allan Odgaard
8e28856cb7 Select paragraph now bound to ⌃⌥P 2012-08-19 14:36:22 +02:00
Allan Odgaard
6677a9ce0a Remove unused NSImage category method 2012-08-19 01:31:47 +02:00
Allan Odgaard
806cb44b4b Support loading @2x image assets
Untested, but we now use imageForResource: (10.7) instead of constructing an absolute file path, so the system should take care of finding @2x assets.
2012-08-19 01:31:02 +02:00
Allan Odgaard
4c66bfd213 Fix copy to find/replace clipboard with non-standard selections
Previously it would place either the column or discontinuous selection on the find/replace clipboard, which wasn’t useful.

Now it only places the “first” range (of a discontinuous) selection on the clipboard, or first row of a column selection.
2012-08-18 23:56:58 +02:00
Allan Odgaard
a84f597b82 Use wrap column from layout
This closes issue #158.
2012-08-18 23:56:58 +02:00
Allan Odgaard
81af193412 Expose (effective) wrap column from layout_t 2012-08-18 23:56:58 +02:00
jtbandes
d15a0eddb3 Include high resolution I-Beam cursor 2012-08-18 14:52:58 -07:00
Allan Odgaard
699969695c Restructure code 2012-08-18 22:39:01 +02:00
Allan Odgaard
9d99e1c617 fixup! Represent font size using a CGFloat 2012-08-18 22:27:06 +02:00
Allan Odgaard
12d700a8a9 fixup! Fix trailing whitespace in text reformat
We still got the extra (double) newline after the paragraph.
2012-08-18 22:11:10 +02:00
Allan Odgaard
1477288795 Redefine definition of paragraph
When we need to work on a paragraph (reflow, unwrap, select, etc.) we now extend upward until we see a blank line, and likewise move downward until there is a blank line.

This is related to issue #154.
2012-08-18 21:52:08 +02:00
Allan Odgaard
be63bda3e7 Support East Asian Width
There is a bunch of functions that deal with the logical column count and these now all count code points with the “east asian width” (unicode) property set as two columns.

This closes issue #206.
2012-08-18 21:29:05 +02:00
Allan Odgaard
45f847d01e Add text::is_east_asian_width
This checks if the character needs to be counted as double-width (for soft wrap and similar).

I used the following script to generate the tables, it should be improved to collapse the ranges:

    #!/usr/bin/ruby

    fixed, start, stop = [ ], [ ], [ ]
    open('|curl -Ls http://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt') do |io|
      io.grep(/^([0-9A-F]+)(?:..([0-9A-F]+))?;[A-Za-z]*W/) do
        if $2
          start << "0x#$1"
          stop << "0x#$2"
        else
          fixed << "0x#$1"
        end
      end
    end
    puts "static uint32_t Fixed[]      = { #{fixed.join(', ')} };\n"
    puts "static uint32_t RangeBegin[] = { #{start.join(', ')} };\n"
    puts "static uint32_t RangeEnd[]   = { #{stop.join(', ')} };\n"
2012-08-18 21:29:05 +02:00
jtbandes
6e70305c5d Move border drawing to OakDocumentView
This allows the border to appear properly when scrolling (with a multitouch device) bounces past the end of the content.
2012-08-18 21:28:56 +02:00
jtbandes
7a56a801b6 Fix bundle menu items' appearance in the Help menu 2012-08-18 21:28:55 +02:00
Gerd Knops
7aa70dd581 Bundle Editor: allow selection of disabled items
Previously disabled items could not be selected, and hence not be re-enabled.
2012-08-18 21:28:55 +02:00
Damon McDougall
36b2e82e3a Fix trailing whitespace in text reformat
On a ^Q text reformat, trailing whitespaces were not removed. Typically
whitespace is typically considered undesirable.
2012-08-18 19:06:14 +02:00
Elia Schito
11e08b7ee8 Let the user resize bundle editor columns 2012-08-18 16:37:22 +02:00
Joachim Mårtensson
18eecca2ab Represent font size using a CGFloat
This applies to scoped font size settings and should be faster than the previous std::string based approach.
2012-08-18 16:28:47 +02:00
Joachim Mårtensson
ece7758e09 Represent theme colors as 4 doubles (RGBA)
This should be faster (and probably more precise) than the previous std::string based color manipulations.
2012-08-18 16:28:47 +02:00
Allan Odgaard
e0a5fcb460 scmls: Show all but “none” status type 2012-08-18 15:30:25 +02:00
Allan Odgaard
c70d981e9d Take bundle signing keys from source index
This makes it easier to allow third parties to add their bundle to our index. They will sign the bundle themselves and we’ll include their info (download URL and description) plus public key in the index.

The index (with the public keys) is itself signed and delivered over a secure connection (https), so there should be no way for a non-trusted person to add a public key to the index.
2012-08-18 15:30:25 +02:00
Allan Odgaard
0defc9ea20 Prune redundant items from SCM data source
For uncommitted items we no longer show folders if items from these folders are already shown.

For untracked items we only show the top-level (untracked) directory and not the items it contains.
2012-08-18 15:30:25 +02:00
Allan Odgaard
5feaa48636 fixup! git: show modifications in upstream folders
A new ‘mixed’ state was introduced with no ‘to_s()’ support (used for debug output and the ‘scmls’ test executable).
2012-08-18 15:30:25 +02:00
Allan Odgaard
d5d79d6c0c Find in Folder: ⌘1-n selects first match
Previously we would select the n’th file in the result list so one would have to then use arrow down to get to the first match of this file. Now we go directly to the first match in the file (unless the matches for the item is collapsed).
2012-08-18 15:30:24 +02:00
Allan Odgaard
c7f267cd12 Show error if failing to unlink old socket
This is in response to issue #183.
2012-08-18 15:30:24 +02:00
Allan Odgaard
7f177f1345 Introduce test targets that always run
This means having a test file open (in TextMate) and using ⌘B, the test will always run, even if it has previously succeeded and none of the test’s dependencies have been updated.
2012-08-18 15:30:24 +02:00
Allan Odgaard
7e9f10ae29 Cleanup project settings
Just removing stuff that is no longer used.
2012-08-18 15:30:24 +02:00
Allan Odgaard
a2a0c187d4 Replace SetItemMark() with Cocoa code
Use of the (undocumented) NSMenuItemBullet was suggested by an Apple engineer and the consequences, if it is unavailable, are harmless.
2012-08-18 15:30:24 +02:00
Allan Odgaard
cf1b4750e4 Go to Current Document is now a toggle
This also works as a (quick) way to deselect all in the file browser (i.e. hit ⌃⌘R twice) which is useful when one wants to run commands on the entire project (e.g. Git → Show Uncommitted Changes).
2012-08-18 15:30:24 +02:00
Allan Odgaard
af55f6b7bd Add deselectAll: to OakFileBrowser
I feel that the better API would be to make the selectedURLs property r/w (instead of read-only), but that is more involved since there is the case of setting a selection while the file browser is still loading items.
2012-08-18 15:30:24 +02:00
Allan Odgaard
64ff8a53e7 Go to SCM Status is now a toggle
This is implemented by invoking “go back” if already showing an SCM URL. If there is no history (unlikely) then we instead “go up (parent)” which should take us to the root of the repository.
2012-08-18 15:30:24 +02:00
Allan Odgaard
7cca8f3f4a Use Objective-C literals
This brings it in line with the rest of the source, which have embraced these.
2012-08-18 15:30:23 +02:00
Allan Odgaard
56d763ee21 Update URL for ninja and CxxTest bundles
These are now stored at the TextMate GitHub account.
2012-08-18 15:30:23 +02:00
Allan Odgaard
7f68e1a8e5 Download URL now taken from the GitHub response
Previously it was based on a hardcoded URL template. This also adds an extra check on the GitHub response, to see if we actually got a URL back.
2012-08-18 15:30:23 +02:00
Allan Odgaard
fee36aaec9 Favorites prefixed with ‘[DIR]’ show folders within
For example if you have all your projects under ~/Projects then you can do:

    mkdir -p ~/Library/Application\ Support/TextMate/Favorites
    cd ~/Library/Application\ Support/TextMate/Favorites
    ln -s ~/Projects "[DIR] My Projects"

This will then have all the folders inside ~/Projects show when you choose Open Favorites… (⇧⌘O).

Long-term it might be useful to store actual property lists in the favorites folder, akin to smart folders (i.e. describe a query for what to show) and/or allow descending into the folders shown in the ⇧⌘O window.
2012-08-18 15:30:23 +02:00
Allan Odgaard
8a5fb16367 Let configure create DefaultBundles.tbz
Motivated by a lot of “where is the syntax highlight?” questions from users that build from source, we now always create the DefaultBundles.tbz (if it doesn’t exist).
2012-08-16 11:46:15 +02:00
Allan Odgaard
d978d7af9c Checkin release notes 2012-08-16 11:13:46 +02:00
Allan Odgaard
218551185b Add gdb targets to build.ninja
Since ninja run each build job with its own stdin/out/err we can’t launch gdb itself in a build job, so we use osascript to launch gdb in a new window.

I used Terminal for this only because it is simpler to script than iTerm2.
2012-08-15 23:23:24 +02:00
Allan Odgaard
4a22d1af54 Split disableIndentCorrections into two settings
The `disableIndentCorrections` setting now only disables the (aggressive) indent corrections that TextMate does while you type.

There is an additional `indentOnPaste` which you can set to:

1. `simple` — this is the indent behavior which was previously implied when setting `disableIndentCorrections`. It indents the paste to the position of the caret and works well for Python.
2. `disable` — the text is inserted as-is without indenting it.
3. «unset» — indent the paste based on the indent patterns of the current scope.
2012-08-15 22:59:51 +02:00
Allan Odgaard
d8c73a82c8 Pasting on empty line no longer inserts newline
This closes issue #69.
2012-08-15 22:53:47 +02:00
Allan Odgaard
85a17b6355 Software update no longer asks about saving changes
If session restore has been disabled then we will still ask, since the user would otherwise lose his changes. Ideally we’d launch the new instances with session restore temporarily enabled.
2012-08-15 22:11:50 +02:00
Allan Odgaard
2307db6631 Allow relaunch without user interaction 2012-08-15 22:00:23 +02:00
Allan Odgaard
6a554d1c68 Retire code necessary to gracefully upgrade from r9110 2012-08-15 21:14:39 +02:00
Allan Odgaard
d1a31f6bff Test if bind or listen fails
This is motivated by issue #165 where someone reports the named socket does not exist.
2012-08-15 20:48:36 +02:00
Allan Odgaard
67dc0b3943 Make OakRunIOAlertPanel accessible from C++
I moved it to a C header. An alternative would be to put some #ifdef’s around the Objective-C stuff in OakAppKit.h, but with the standalone header, it’s clear that this is the only thing we need from OakAppKit.
2012-08-15 20:47:18 +02:00
Paul Wilde
f4ecbe0f1e Updated Preferences icons for HiDPI displays. 2012-08-15 19:48:01 +02:00
Allan Odgaard
73088e87c3 Update ramte
The new version supports reading settings from /etc/rmate.rc and ~/.rmate.rc.

It also does a better atomic save.
2012-08-15 19:44:32 +02:00
Allan Odgaard
926f3ba09d Add a TM_ISSUE_URL setting
See 570d25795d for detauls.
2012-08-15 16:47:36 +02:00