Commit Graph

2057 Commits

Author SHA1 Message Date
Allan Odgaard
b2adeb2f49 Checkin release notes v2.0-alpha.9487 2013-10-08 23:27:41 +02:00
Steven Clukey
bbe1ca357b Add “invisiblesMap” option to the .tm_properties file
This setting allows changing which invisibles are shown and what glyph
is used for them.

Invisibles are '\t', '\n', and ' ', to turn one off, add ~[\t \n] to
the settings string. To set the glyph used for the invisible, add [\t
\n][glyph_to_use].
2013-10-08 23:06:29 +02:00
Steven Clukey
49c949d65e Add layout_t::set_character_mapping
This allow configuring which characters should be used to render tabs, spaces, and newlines (when “show invisibles” is enabled).
2013-10-08 23:03:40 +02:00
Steven Clukey
8cea97aeca Added spaces as an invisible 2013-10-08 22:00:11 +02:00
Allan Odgaard
9474a35f58 Remove QuickLook support for HTML, iCal, csv, and tsv files
All these types are already handled on a default system.

Related to issue #1141
2013-10-08 21:59:56 +02:00
Allan Odgaard
9db7613794 Use file::reader_t for QuickLook preview
This ensures the file gets transcoded into UTF-8.

Closes #1141
2013-10-08 21:59:56 +02:00
Allan Odgaard
9b57695a5c Use file::reader_t for folder search 2013-10-08 21:59:56 +02:00
Allan Odgaard
0e0abfdafe Add UTF-8 reader
This will transcode a file to UTF-8 with a best effort to use the correct encoding, looking at byte order mark, extended attributes, .tm_properties, and falling back on frequency analysis.
2013-10-08 21:59:55 +02:00
Allan Odgaard
0a47054e14 Fix potential exception in encoding selector sheet
Some valid UTF-8 byte sequences are not valid code points, so our “simple” validation is no guarantee that creating an NSString from the data will succeed.
2013-10-08 21:59:55 +02:00
Allan Odgaard
17a861fd37 Fix potential infinite loop in the encoding selector sheet 2013-10-08 21:59:55 +02:00
Allan Odgaard
dff40138f1 Add proper sorting of numeric plist keys 2013-10-08 21:59:55 +02:00
Allan Odgaard
9a6451da2c Create generated headers in configure script
Fixes #1136
2013-10-08 21:59:55 +02:00
Allan Odgaard
adb2741689 Remove non-UTF-8 from clipboard data
It should be safe to assume that clipboard data is valid UTF-8, but I’m seeing crashes related to creating a CFString (from buffer content) after a paste operation, so the assumption might not be valid.
2013-10-08 21:59:55 +02:00
Allan Odgaard
b45e52ae71 Remove non-UTF-8 from command output
Previously we would create a hex dump from the output.
2013-10-08 21:59:55 +02:00
Allan Odgaard
4d37803f5c Remove non-UTF-8 from completion command output
Previously an entire line containing non-UTF-8 would be discarded, now we only remove the problematic bytes.
2013-10-08 21:59:54 +02:00
Allan Odgaard
2fa5d7ddb2 Add UTF-8 sanitization function
This can be used to remove malformed multibyte sequences.
2013-10-08 21:59:54 +02:00
Allan Odgaard
51a7424c90 Add additional crash report info 2013-10-08 21:59:54 +02:00
Allan Odgaard
81006920c2 Simplify binding setup for encoding pop-up button 2013-10-06 23:09:12 +02:00
Allan Odgaard
5b27a39bb8 Fix compatibility with 10.7 2013-10-06 23:09:12 +02:00
Allan Odgaard
1baa953955 Set the encoding window controller as window delegate
No reason for this other than it seems right.
2013-10-06 23:09:11 +02:00
Allan Odgaard
72d6851eb0 Avoid leaking the encoding chooser sheet 2013-10-06 23:09:11 +02:00
Allan Odgaard
186af2fb21 Always place bookmarks on top of “search marks”
Logically I think the less temporary marks should be eclipsed, but this currently lead to inconsistencies with respect to hover images, e.g. hovering a search mark that also has a bookmark should show “remove bookmark” which it presently doesn’t, and will require a bit of refactoring to allow.

Issue #1132
2013-10-05 14:32:37 +02:00
Allan Odgaard
bf09650c0b Reload file using most probable charset when it changes on disk
Previously if the file had been loaded as ASCII/UTF-8 and was changed on disk to something other than UTF-8, TextMate would go into infinite loop (retrying with UTF-8). It now uses the encoding classifier to find the most probable encoding (based on learned frequencies) falling back on ISO-8859-1, if there is no candidate.

Ideally it would bring up a warning, informing the user of the problem and allowing a manual correction of character set.

Fixes #1073.
2013-10-05 14:32:36 +02:00
Allan Odgaard
b8bccf684b Fix re-indented paste with zig-zap selections
When selecting multiple lines, but not including the newline on the last line of the selection, TextMate still consider it a “full line” and will insert a newline when pasting, unless pasting on an empty line.

Previously the check to see if the line was empty, would not account for a non-empty but selected line, which would effectively be empty since the selected text is deleted before pasting.
2013-10-04 22:02:56 +02:00
Allan Odgaard
5f765ab061 Use encoding::classifier_t when opening files 2013-10-04 17:09:02 +02:00
Allan Odgaard
bd978fcb7e Add naive encoding classifier 2013-10-04 17:08:21 +02:00
Allan Odgaard
344fac505b Improve the “unknown encoding” sheet
A preview is now shown with the problematic lines highlighted.
2013-10-04 17:08:12 +02:00
Allan Odgaard
a2131a6472 Add two-way binding support to OakEncodingPopUpButton
Previously binding to the view’s encoding property would not update the bound object when the view changed its value.
2013-10-04 16:53:50 +02:00
Allan Odgaard
2fe3b95585 Add debug output 2013-10-04 16:51:27 +02:00
Allan Odgaard
f87724f406 Rules are (unfortunately) not const during parsing
This is because of the “included” boolean we use to mark rules to avoid collecting them twice.
2013-10-04 16:51:27 +02:00
Allan Odgaard
558d7ee8b9 Don’t default placeholders with no default text as mirrors 2013-10-04 16:51:27 +02:00
Allan Odgaard
4363a27897 Source bash_init.sh for code in snippets that have no shebang
This is consistent with TextMate 1.x behavior.

Fixes ruby.tmbundle#56
2013-10-04 16:51:27 +02:00
Allan Odgaard
40233245e2 Add crash report info to code involved in a crash 2013-10-04 16:51:27 +02:00
Allan Odgaard
c602958e66 Don’t stack allocate space for extended attribute values
Seeing a few crashes related to this, most likely because an extended attribute holds a value larger than available stack space.
2013-10-04 16:51:27 +02:00
Allan Odgaard
c5558d0574 Remove a few std::shared_ptr typedefs 2013-10-04 16:51:26 +02:00
Allan Odgaard
fe9b6b0721 Workaround for Xcode 5
My interpretation: The old inline array is interpreted as an initializer list which cannot (yet) be used with Objective-C objects when ARC is enabled.

Fixes #1037
2013-09-22 12:55:42 +02:00
Allan Odgaard
76dc76b57a Fix typo in debug output 2013-09-22 12:55:42 +02:00
Allan Odgaard
72791ce406 Update last effective tab when number of tabs change
Closes #1120
2013-09-15 21:32:15 +02:00
Allan Odgaard
9fe5a058ce Make buffer_t::wait_for_repair a no-op with no grammar 2013-09-15 21:22:44 +02:00
Allan Odgaard
b4f7fc9a49 Remove unsupported encodings (libiconv v2.4.0) 2013-09-15 21:22:44 +02:00
Allan Odgaard
cf599498a9 Fix encoding names for Atari ST, GB_1988-80, and HZ-GB-2312 2013-09-15 21:22:44 +02:00
Allan Odgaard
e6541240a9 Checkin release notes 2013-09-15 20:20:07 +02:00
Allan Odgaard
3e2567d2d0 Add Sticky and Close Tabs to the Right to File menu
The title of the Sticky item is nonsensical, but I couldn’t come up with anything good.

Closes #1110.
2013-09-12 23:46:05 +02:00
Allan Odgaard
712a18cd50 Add IBAction to methods 2013-09-12 23:46:05 +02:00
Allan Odgaard
1ae67343f1 Add menu validation for close tabs related actions 2013-09-12 23:46:05 +02:00
Allan Odgaard
35ad8a1ed9 Add action method for closing tabs to the right 2013-09-12 23:46:05 +02:00
Allan Odgaard
aa08d67090 Let tab menu methods fallback on active tab
These normally require that the sender is an NSIndexSet or has one as its represented object, but with this commit, they will also be usable when there is no index set available, and will then simply use the active tab.
2013-09-12 23:46:05 +02:00
Michael Sheets
683ccd3ab2 Add icon definitions to CFBundleDocumentTypes
Works around a bug where icons are not inherited from the UTI definitions.
2013-09-12 23:46:04 +02:00
Allan Odgaard
fb8627d077 Intersect left/right scope for rendering soft break nodes
This is only relevant for indented soft wrap where e.g. the text following the soft break is underlined: Previously we would then render an underline for the soft break node itself (which normally consists of whitespace).
2013-09-12 23:46:04 +02:00
Allan Odgaard
e4a5db0f3b Only first call to window.close() would have an effect
This is a workaround for https://bugs.webkit.org/show_bug.cgi?id=121232
2013-09-12 23:46:04 +02:00