TextWrangler 2.1 Release Notes

TextWrangler 2.1 is an update to TextWrangler 2.0 which includes numerous new features and enhancements, as well as fixes for various reported issues.

This page documents all feature enhancements and bug fixes included in the TextWrangler 2.1 release. For details on changes made in previous versions, please see the release notes archive. For complete information on TextWrangler’s features, please refer to the included PDF user manual, which you can access by choosing “TextWrangler User Manual” from the Help menu.


  • TextWrangler 2.1 requires Mac OS X 10.3.5 or later. This is necessary because 10.3.5 contains fixes for bugs which adversely affected the operation of TextWrangler.
  • The folder previously known as “TextWrangler Support” is now named “TextWrangler” in the file system (i.e. ~/Library/Application Support/TextWrangler). If this folder doesn’t exist when the application starts up, it will be created for you and filled with the factory default examples.

NOTE: Keystrokes are no longer stored directly in the files themselves (among other reasons, because all users don’t have write access to the local domain files.) Existing keystrokes in files themselves are ignored – you’ll have to set your keystrokes once after upgrading to this version.


The following features and enhancements are new for TextWrangler 2.1:

  • Scripting interfaces for Convert to ASCII, Educate/Straighten Quotes, Normalize Line Endings, Change Case, Zap Gremlins, and Entab/Detab, Sort Lines, Process Lines Containing, Process Duplicates, Add/Remove Line Numbers, and Prefix/Suffix Lines now accept strings as the direct parameter.
  • ‘#’ is now allowed as a quoted line delimiter, which facilitates the use of “Rewrap Quoted Text” for comments in Perl and other Unix-y languages which use ‘#’ as a comment delimiter.
  • “Find in Reference” now performs a search for the selected symbol on the Apple Developer Connection web site. Its behavior has also been tweaked to match that of Find Definition: if possible, the symbol name is determined by inspection around the insertion point, rather than requiring you to type the name in if there’s no selection.
  • The syntax for the open event has been enhanced to give scripters more control over where opened documents go (overriding the preferences on a case by case basis):

open aFileList opening in <value>

As in previous releases, <value> may be a reference to an existing text window. New for this release, value may be one of: front_window, new_window, or separate_windows, which overrides whatever your document opening behavior is and does the following:


Files in aFileList are opened in the front text window (if it does not exist, a new one will be created).


A new text window will be created and all files in aFileList will be opened into it.


Each file in aFileList is opened into its own text window.

  • The edit tool has three new flags which allow you to override, per invocation, your preferences for opening documents into multi-document or standalone document windows.


opens the documents in the frontmost text window, creating one if necessary


opens the documents in a new text window (1 for all arguments)


opens each document in its own window

These flags are mutually exclusive – you should only specify one. The flags work when creating files and when piping to the tool, but are ignored for URL arguments.

  • The move scripting command is now supported for moving text documents between text windows. For example:

tell application “TextWrangler” if (count of text windows) > 0 then select text window 1 repeat while (count of text windows) > 1 set ct to count documents oftext window 2 repeat with i from 1 to ct move document 1of text window 2to text window 1 end repeat end repeat else beep end if end tellp. (A copy of this sample script will be put in the default support folder for new installs.)

  • There is an “Open in Separate Window” command in the view menu. It does the same thing for the active document that the same command does from the action menu in the drawer. (It should now be possible to reasonable use the multi-document feature with the drawer closed if you so desire.)
  • The preference in “Editing: General” for “Use Hard Line Numbering in Soft-Wrapped Views” controls whether TextWrangler uses hard lines in:
  • the line display
  • for triple-click, select line, and line select in the linebar
  • The document drawer’s width is now scriptable.
  • The Open dialog contains a popup menu that lets you override your document opening preference for this operation. The choices are (default), Front Window, New Window and Separate Windows. Front Window is disabled if the front window doesn’t exist, or is blocked by a sheet.
  • Added an ‘—ignore-spaces’ switch to the edit tool as a shortcut to setting all three whitespace switches.
  • Restored the function scanner and syntax coloring for 68K Assembler. Apparently people use it for similar languages.
  • The “recent strings” popups now display a little more text, and the action of choosing one to insert the string into the appropriate field is now undoable (so if the popup isn’t enough, you can examine the whole string).
  • Command-Option-Double-Click for Find Selection makes its triumphant return.
  • Disk Browsers get a popup menu listing recently used folders. The first item in the menu is “Other…” for going to an arbitrary folder. (This command used to be on the Directory popup; that popup is now strictly a path popup to the directory you’re currently viewing.)
  • There’s a new setting in the “Editing: General” preferences: “Include Delimiter Characters when Balancing”. This switch controls whether the balancing characters (paren, brace, bracket, etc) are selected when you do a “Balance” from the Text menu or double-click balance. The factory setting is “on” for consistency with previous versions; CodeWarrior refugees may find comfort in turning it off.
  • There are four new commands on the Search menu:

Go to Function Start
Go to Function End


Go to Previous Function
Go to Next Function

They all do pretty much what their names imply, but note that “function” as used in the command name is really a shorthand for “item that appears on the function popup”.

If you expect to use these commands frequently, consider assigning each a keyboard equivalent using the “Set Menu Keys” command on the application menu.

  • Added language mappings for “Log File” (default suffix “.log”) and “Data File” (default suffixes “.dat” and “.data”). If you do a “Reset All” in the Suffix Mappings list (Languages preferences) you’ll pick up these new defaults; alternatively you can add the mappings yourself.
  • Added a new preference to the Application prefs panel, under Optional Application Services: the “Text Factories Menu” switch controls whether the Text Factories menu appears in the menu bar. Changes to this preference will take effect the next time you start the application.
  • Added a new command to the Text menu: “Find All Misspelled Words”. It will highlight (using the spelling error highlighting) all misspelled words in the document. It’s only enabled if you’re using the built-in spelling checker.
  • In the Spelling prefs panel there is now a setting to control the used when underlining misspelled words, and a button to return that setting to its factory default. (You may find it useful to change the color if you use nonstandard color schemes in the Text Colors preferences.)
  • Command-Down-Arrow in the disk browser will open the selection if
  • there is one item selected and it is a file
  • there are multiple items selected, regardless of type
    If there is one item selected and it is a folder, it still dives into the folder as before.
  • The “replace” scripting verb takes a new parameter: “replacingString”. If present, it’s a string that will be processed instead of the specified reference. So, for example:

replace “foo” using “mumble” replacingString "foobargrumble"p. If “replacingString” is present, the modified form is returned upon completion of the event. If no occurrences of the search string are found, the input replacingString parameter is returned.

  • Option-clicking the drawer widget will show/hide the documents drawer for all text windows. This feature is only enabled when running on 10.4 (because of bugs in the 10.3 drawer implementation).
  • Option-clicking the toolbar widget will show/hide all the status bar for all text windows.
  • Option-clicking the zoom box will zoom all open windows.

N.B. Previously we used Option to suggest that the window should be zoomed as big as possible. This conflicted with the system standard behavior of making Option mean “all”. The Command key can now be used to suggest that the window should be zoomed as big as possible.

  • The document menu in the navigation bar will
  • Show full paths for all files if show full paths in window menu is turned on.
  • Show full paths for files with non-unique names otherwise (this is the same behavior as in the window/recent menus).


The following items have changed in TextWrangler 2.1:

  • Emacs keybinding support is now on by default, the status display is now off by default.
  • Folders in the “Recent Folders” section of the sources list (used in the Find dialog and other places) are now sorted by name.
  • The Next/Previous document commands now work in MRU (most recently used) order. When closing a document, you will be taken to the most recently used document (previously you were taken to the next document in the list in the Documents Drawer).

This provides a user experience identical to that with documents in separate windows (where window z-order provided the MRU-like behavior).

  • Scripting change: document references

Previously, documents were indexed inside of multi-document windows by their display order in the Documents Drawer. This mean that document 1 of the application might not be the document that was being edited. This in turn required scripts to be revved for multi-document window awareness, and the introduction of the “active document of text window 1” construct.

The active document property is still supported, but it is no longer necessary. If a text window is frontmost,

document 1 of application “TextWrangler” document 1 of text window 1 of application “TextWrangler” active document of text window 1 of application "TextWrangler"p. now all refer to the same document. The side effect of this is that when accessing documents by index inside of a text window, a documents index is

  1. not its visual index in the Documents Drawer
  • the index may change over time
    This is no different than documents in standalone windows. Their index will drift over time as the document’s window is selected or shuffled in the z-order of windows. (The one exception here is that if the windows are sufficiently spread out, you can determine the index by looking at the window z-order.) If you need a permanent reference to a document, use an id reference, not an index based reference.
  • The order of documents in the
  • Documents Drawer
  • navigation bar menu
  • documents submenu of the window menu

is now either name order or creation order. It is controlled by the same preference which controls whether windows in the window menu/list are sorted by name or creation order.

  • The “Super Get Info” command has been renamed to “Open in Super Get Info” and has moved to the “View” menu.
  • The “Get Info” and “Reveal in Finder” commands have been relocated to the “View” menu.
  • The Next/Previous Document commands now wrap around (instead of stopping at the end of the list.) The same is true of the next/previous buttons in the navigation bar.
  • The script menu once again does lightweight filesystem polling to pick up additions for the benefit of Script Debugger and Smile users (whose shipping versions don’t do FNNotify when creating new files.)
  • “Open in New Window” is disabled on the gear menu and removed from the contextual menu if there is only 1 document selected in the drawer (to avoid confusion about why the two commands do the same thing – they only do the same thing if the selection is a single item.)
  • The printing dialogs have been modernized, and are now document-modal (“sheets”). The application-specific printing settings can now be found under “Text Printing” in the Print dialog’s popup menu.
  • Modernized the Recent Search Strings and Recent Replace Strings popups in the Find dialog.
  • When the selection range is empty, #! filters will process the entire document rather than an empty string. (This is consistent with how most transforms on the text menu work.)
  • In prior versions, Paste Previous Clipboard was only enabled if the previous operation was a paste. Beginning with this release, Paste Previous Clipboard will be enabled if any other clipboard in the ring is non-empty.

If the previous operation was a paste, Paste Previous Clipboard will replace that paste with the contents of the previous clipboard. If the last operation was not a paste, it will be an ordinary paste of the previous clipboard.

  • Refined the feedback presented when no (more) errors are found when using the spelling checker.
  • The “Text Options…” dialog has been modernized (and now runs as a sheet attached to the document’s window).
  • The “Printing Options…” dialog has been modernized (and now runs as a sheet attached to the document’s window).
  • The “Function Popup” preferences pane has been removed, and the three settings that were there have been moved into the “Text Status Display” preferences.
  • If ’Use “Hard” Lines in Soft-Wrapped Views" is turned on (Editing: General prefs), the cursor position display will now display the character position from the start of the hard line, rather than the start of the display line.
  • Deleted the placeholder items from the Recent Search Strings and Recent Replace Strings popups in the Find dialog.
  • The factory default for “Allow Documents Drawer to Acquire Keyboard Focus” has been changed to false.
  • The “Other…” item on the disk browser’s directory popup now drops a sheet rather than using an application-modal file dialog.
  • The “Software Update” preferences pane now displays the URL that will be used when querying our software update server for version information.
  • When an operation requires your password, the prompt in the authentication dialog now includes a description of why the password is being requested.
  • The “search script” and “replace script” parameters to the “find” and “replace” events are no longer used, and so have been removed from the scripting terminology and internal implementation.
  • When using certain factory plug-ins from old versions of BBEdit or TextWrangler, you’ll now get an error message instead of a crash. (Note that chapter 2 of the user manual is explicit on not using old factory plug-ins.)
  • The Documents preference panel has been split into a Documents panel (containing options which control document opening/closing behavior) and a Documents Drawer panel (which controls drawer-specific behaviors.)
  • Keychain use for FTP/SFTP passwords is now compulsory. The option in “FTP Settings” prefs to “Store Passwords in Keychain” is gone.
  • The storage format for FTP bookmarks has changed. The new format is human-readable but not human-modifiable. Bookmarks stored in the old format will be imported. (The new file is “FTP Bookmarks.xml”.)
  • The “Check Spelling” command on the Text menu has been renamed to reflect its action: “Find Next Misspelled Word”.


The following problems have been corrected in TextWrangler 2.1:

  • Worked around an OS bug which would cause a window to remain hidden after showing TextWrangler if a certain sequence of steps had occurred before TextWrangler was hidden. (N.B. Selecting the window from the Window menu or Windows Palette always caused it to re-appear.)
  • TextWrangler no longer attempts to do authenticated reads of files on network volumes. A reasonable error code is once again returned when a read fails due to not having read permission of a file on a network volume.
  • Fixed a bug where closing a window or cycling through open windows would sometimes leave a stale/incorrect cursor.
  • Fixed a bug which caused the following sequence to not result with the document re-opened.

tell application “TextWrangler” set f to file of document 1 close document 1 open f end tell

  • Fixed a bug where if exchange characters affected the syntax coloring runs, the range of affected text wasn’t redrawn.
  • Return a coerced record from the Unicode to styled text coercion handler to avoid subsequent string concatenation failures in the script.
  • Reduced a substantial part of the overhead for large clipboard imports.
  • Fixed a bug where issuing the Copy command had the side effect of importing the clipboard (which introduced unnecessary overhead.)
  • Fixed an obscure wrapping problem that sometimes occurred when printing using a font with embedded bitmaps (e.g. ProFont) and a font size that matched one of those bitmaps.
  • Fixed a bug where the code which made room for the documents drawer before opening (by sliding or resizing the window) would incorrectly move it to the main screen in 2 screen configurations.
  • Fixed a regression where creating a document from script caused the initial name property to be ignored/overwritten:

tell application “TextWrangler” activate set fname to “newdoc” make new text document in window 1with properties {name:fname} end tell

  • Fixed a regression where if you canceled the dialog for “Do you want to unlock this file owned by someone else”, the document was still marked locked, but the underlying text view was set modifiable.
  • Fixed a bug in the results browser where after clicking on an entry representing a deleted file, the status bar would refuse to draw the path when subsequent entries were selected.
  • Fixed a bug which caused the “FileClose Window” menu script not to fire.
  • Cleaned up the message presented when dropping a language module file onto BBEdit or TextWrangler.
  • “Set Marker…” on the contextual menu works again
  • Fixed bug in which the “file” property of the “recent file” class was not returned properly (it always pointed to the application executable’s parent folder in the application package).
  • “Find Selection” is now enabled when there is no selection, and will do the right thing w.r.t. ctags lookup when chosen with the insertion point in a reasonable location (as when contextual-menu clicking).
  • When asking for the disk file of a document whose file has vanished underneath it, it will return an error instead of an alias to the non-existent file.
  • When doing a Replace All where the search and replace strings are the same length, there’s no reason for the selection range to change, so it no longer does.
  • Option-left/right-arrow no longer eats stuff following a run of whitespace characters, with the exception of a run which is a single space char.
  • Corrected a performance regression where typing lagged in files with lots of functions if show current function was turned on.
  • Fixed bug in which Print All would print multiple copies of the active document in each multi-document window, rather than one copy of each document as it should have.
  • Fixed bug in which the “grep substitution” scripting event wasn’t correctly handled if it was inside of a tell block targeting something other than the application.
  • Fixed a bug where “Use Two Screens” was ignored by the difference window arranger if windows were being arranged on the smallest screen.
  • Fixed a bug where there was no stable secondary sort for windows or documents in a multi-document window. If an event triggered the list to be resorted, like-named objects may have swapped position relative to each other. This is no longer the case.
  • Fixed bug where saving (or otherwise rebuilding the list of documents in the documents drawer) had side effect of scrolling the document drawer list to the top, losing your visible range.
  • Fixed a regression in which running #! scripts from disk browsers didn’t work correctly.
  • Fixed right-arrow stickiness that sometimes occurs after using command-up-arrow.
  • Made the button titles dynamic in the LineNumbers sheet.
  • Fixed a bug in TextWrangler whose symptom was lines like the following appearing in the console after initially showing the font panel:

TextWrangler123 * _NSAutoreleaseNoPool(): Object 0xc0d0e10 of class NSConcreteAttributedString autoreleased with no pool in place – just leaking

  • Command-M is bound to “Minimize” for new TextWrangler installs.
  • Fixed a regression where applying softwrap state to a window on open would sometimes result in the vertical scrollbar becoming out of sync.
  • Fixed a bug in source control form windows and perl/python references windows where:
  1. inapplicable options were enabled in the text options dialog
  • confirming the dialog resulted in a -1728 error
  • Fixed a bug where the “Open in Super Get Info” command failed for files on non-HFS volumes.
  • Fixed bugs in the system speller support which prevented TextWrangler from working correctly with cocoAspell.

These were a result of incorrect/ambiguous system documentation on NSSpellChecker. Thanks to Anton Leuski for helping to sort this out.

N.B. Basic checking/suggestions now work with cocoAspell. Because of how TextWrangler interacts with the spell checker, cocoAspell’s filtering (TeX, for example) presently does not work.

  • The argument parser for the command line tool interpreted any argument starting with a + as a line number specifier. This has been relaxed such that only arguments of the form +[decimal digits] are treated as line number specifiers. This makes it possible to open files with names of the for +example without workarounds.

If you must open a file in the current directory whose name contains the string “+[decimal digits]”, you must give its local or full path, e.g.

edit ./+1234p. or

edit /full/path/to/+1234

  • Changed the wording for several Hex Dump items to Document (instead of Window).
  • Fixed a bug where changing the name of an untitled inactive document via script didn’t cause the documents drawer to update immediately.
  • Text scripting is now line feed agnostic. (Script Editor 2 puts \n in multi-line string literals. \r is the native in-memory format for TextWrangler. The translation now happens automatically so the scripter doesn’t have to do it.)
  • Fixed a bug where the following didn’t work:

tell application “TextWrangler” set l to line 1 of text window 2 tell text window 1 make new line at end with data l end tell end tell

  • Fixed a potential data loss bug where if you
  • had multi-document window(s) open
  • had dirty documents which weren’t the active document in their window
  • issued “Close All Windows”, option-clicked the close box, or quit the application, choosing to save modified documents

the application would quit and discard unsaved changes in inactive documents in multi-document windows.

  • Fixed the bug responsible for palettes not hiding around a diff when the diff was kicked off from twdiff in the terminal.
  • Emacs move to end/beginning of line now work on hard-wrapped lines, not on screen (soft-wrapped) lines, consistent with Emacs’ behavior.
  • Emacs kill line works on hard-wrapped lines, consistent with Emacs’ behavior.
  • Delete to beginning of line works on hard-wrapped lines now, , even when viewing as soft-wrapped.
  • Delete to end of line works on hard-wrapped lines now, even when viewing as soft-wrapped.
  • Worked around an OS bug where if the temp directory was cleared (by a cron task or a helpful utility) while TextWrangler was running, #! filters would cease to operate.
  • Fixed a bug where Exchanges Characters would scramble the text display if certain pre-conditions were met.
  • Fixed a bug where the documents drawer would stop listing new documents.
  • Fixed a bug where “New with selection” was incorrectly enabled when the documents drawer had focus.
  • Scaled PICT files once again display properly in the built-in viewer.
  • Fixed a pathological performance problem flushing the state file in certain situations.
  • The command line tools are now installed with explicit permissions (rather than copied and subject to the user’s umask.)
  • Double-clicking on a single space (or tab) will now select it.
  • Fixed a scripting terminology problem where copying to new document wasn’t handled correctly for process lines containing.
  • More PHP keyword updates
  • Fixed bug in which “Open Selection” would loop endlessly in certain conditions.
  • Fixed a bug where Un/Comment didn’t correctly set the undo menu item name.
  • The presence of NULs in a document no longer interfere with Codeless Language Module operation. NULs in the Codeless Language Module Property List file are still not allowed.
  • Fixed option-shift-arrow behavior to properly respect the selection anchor when changing directions from up to down or vice versa.
  • The PHP syntax coloring scanner now ignores ‘?>’ in PHP strings (including HEREDOC) and comments, even when the PHP in embedded in HTML.
  • PEToScrap now puts out a plain TEXT alternative to the Unicode it puts out using the system script rather than always using smRoman.
  • Fixed a bug in preference file creation where new preferences (not migrated) would get the application bundle as the default search path instead of the user’s home directory.
  • Changed the substitution for per mille to conditionally include a space.
  • Home/End now correctly set the horizontal scroll position along with the vertical.
  • Added ‘enum’ to Java keyword list.
  • Fixed a bug where in certain situations if deleting the selection caused the linebar to shrink the text wasn’t completely redrawn after scrolling.
  • Fixed numbering wraparound to a negative when adding line numbers with extremely large values. (Note that it’s now possible to wrap around to small positive numbers instead, though either case is extremely unlikely to happen in nature.)
  • Fixed crash when adding line numbers with Keep Text Justified and starting with a number that was very close to 231.
  • The maximum number of recent items is now pinned to 0×80.
  • Adjusted the default suffix mappings for Object Pascal to remove “.ppu” and add “.pp”.
  • Fixed a bug where after doing a multi-file diff, the original windows bounds of open documents wasn’t restored.
  • A substantial reworking of the commenting code to address bugs.
  • Reworked the storage of recently used search&replace strings to avoid display glitches in the menu with non-Roman text.
  • Leading/trailing whitespace are trimmed off the query string before passing it to perldoc or pydoc.
  • Fixed a bug in the Emacs keybinding layer where M-< and M-> didn’t work correctly if the editor preference for Home and End keys was set to “Move Cursor to Beginning and End of Current Line”.
  • Fixed ancient bug which would cause a crash when doing a Replace All using Grep which involved a generated replacement pattern of significant size.
  • Fixed a bug where changing focus between two split views didn’t update the line highlight correctly.
  • Fixed a bug where scrolling a non-focused split view would cause the line highlight to drawn.
  • Fixed a bug where if the end of a selection were on a line boundary and you “shift-line-clicked” on a line preceding that boundary (including the line that the boundary ends), the end of the selection would erroneously be extended down one more line.
  • Fixed a bug where the “Open User Manual” command was enabled when a modal dialog was up, but selecting it didn’t work.
  • Check for Update is disabled while modal dialogs are up.
  • Corrected a drawing glitch where clicking in the 2nd split pane when the drawer previously had focus would sometimes cause the clicked line to temporarily disappear.
  • Fixed a drawing glitch that would occur when clicking in the lower pane of a split-pane view with line highlighting in a multi-document window and when the Documents drawer has keyboard focus just prior to the click.
  • Fixed a bug which would result in an -8738 error when trying to save files using certain default editor fonts.
  • The single-file “Replace All” results reporting sheet now limits the amount of text it displays, so as to avoid situations in which the “OK” button would go off the bottom of the screen if either the search string, the replace string, or both were extremely long.
  • Fixed bug in which the Disk Browser didn’t work correctly with the Desktop folder in a FileVault-protected home directory.
  • When swapping documents in multi-document windows, the previously active split view is restored.
  • Fixed incorrect sorting of suffixes in the Languages prefs panel.
  • Fixed cosmetic bug in multi-file Find Differences results in which items in the “In Both” list were always underlined.
  • Fixed cosmetic bug in multi-file results lists in which turning off the “Show File Icons” option (in the Differences prefs) would set the wrong line height and cause descenders to get clipped off.
  • Fixed incorrect display of search results listings for a file that got deleted while the browser was still open.
  • Fixed bug in display of non-Roman search string in the summary line of Search Results browsers.
  • Non-printing characters in the recent search and replace strings are now escaped before placing them on the menus in the Find dialog.
  • Non-printing characters in the search string are now escaped before display in the summary area of a search results browser.
  • Fixed a situation where -1708 would be returned when toggling edit options if the default character wrap width had been set to 0 in the preferences. (The factory default is used in this situation.)
  • The Clipboard window now honors the application settings for foreground and background color.
  • When running a Text Factory or doing a multi-file Replace All with the “Leave Open” option set, the application no longer activates each document that is modified.
  • Fixed bug in which the “Print Full Pathname” print setting wasn’t honored.
  • Fixed a bug in which incorrect scripts of the form

tell application “TextWrangler” tell container of selection delete startLine end tell end tellp. would cause the application to crash.

  • Corrected the scripting terminology for “apply text factory” to allow specification of an “options” parameter for controlling whether results are shown and/or returned.
  • Fixed bug in which Open File by Name was inconsistently enabled when the list view of a { disk, results } browser window had keyboard focus.
  • Fixed a bug in the scripting interface in which escape sequences in search and replace strings (for the “find” and “replace” events) weren’t handled properly, leading to failed searches.
  • Fixed bug in which errors occurring during regular-expression searches weren’t properly handled (or reported) during searching.
  • Fixed a highlighting glitch where if you inserted or deleted something to the left of a tab and then used shift-right-arrow to extend the selection to the tab and beyond, characters following the tab would sometimes mysteriously disappear.
  • The “Find Selection” command now records the selection in the Find dialog’s history of recently used search strings.
  • Added a fallback handler for old-style styled-text clippings and clipboard elements that use font numbers internally. If a style range has a bogus font number that can’t be resolved to a UnicodeMapping, the range will be converted to Unicode as though it were MacRoman (which may not be correct, but will at least preserve a one-to-one correspondence between the original bytes and the Unicode characters they are converted to).
  • Fixed a bug where kASAppleScriptSuite/kGetAETE would inappropriately show up in recorded scripts if TextWrangler parsed its own terminology while script recording was in progress.
  • Fixed a bug where it was possible (but shouldn’t have been) in some situations to close a window that was blocked by a sheet.
  • Fixed a bug in the Codeless Language Module function scanner that would allow it to go off into the weeds on occasion.
  • Fixed a bug which resulted in a stale hover state for the close widgets in the documents drawer and window list under certain conditions.
  • The Emacs keybindings for scroll-up and scroll-down now move the insertion point as they do in emacs itself.
  • Fixed a bug where Emacs kill line sometimes inappropriately appended to the clipboard in situations where it should have rotated the clipboard ring and started a new kill sequence.
  • Fixed a bug in the Emacs universal argument parser where, for example, Control-U 15 Control-N moved the cursor 6 lines instead of 15.
  • The behavior of dragging dock items from versions of DragThing later than 5.5.1 is once again equivalent to that of dragging them from the Finder.
  • Tweaked the UTF-8 to/from Unicode converters to more properly deal with “surrogate pairs”.
  • Fixed a bug where the “This file has been moved or deleted” error text in the lower pane of browser windows wasn’t scrolled into view if certain edge conditions were present.
  • Tweaked the C++ function scanner so that qualified names of the form ‘foo::bar’ are recognized as such even if there are spaces on either side of the ‘::’.
  • Reinstated a previous fix for detecting leading whitespace before preprocessor directives in the C/C++ syntax coloring scanner and for similar situations in VBScript, only this time the fix was modified slightly so that it actually works.
  • The appropriate character escape sequences are substituted when displaying the annotation for a Search Results browser in the Window menu.
  • Fixed bug in which some commands on the Edit menu were inappropriately enabled when the search sources drawer had keyboard focus, and in which attempting to paste at that point would cause the application to crash.
  • Adjusted the single line radio groups in the Hex Dump and Number Lines sheets/dialogs to be 18 pixels tall per the HIG. This avoids clipping on 10.4.
  • Fixed an inconsistency in the handling of \n between grep and literal search/replaces.

Literal ASCII 0×10 (as will arrive for multi-line strings from Script Editor 2) is translated to the native line end format; “\n” is always treated as a new line.

  • The implementation of “Enter Search Pattern” and “Enter Replace Pattern” is now consistent with the user manual. (That is “Use Grep” is turned on in addition to entering a the selection as the pattern without escaping special grep characters.)
  • When doing a Replace from the Find dialog, the undo string now reads “Undo Replace” instead of “Undo Scripting”.
  • The text info dialog now honors the “Use Hard Lines” preference when counting lines.
  • Fixed a bug where Reveal Selection would actually open the file using the Finder for certain file types in file group documents.
  • Restored the no-op bbxtGetPreference and bbxtSetPreference for the benefit of shipping third party plug-ins which rely on the APIs.
  • Worked around an OS behavior where bringing up a contextual menu in an empty text view would sometimes track an invisible menu (or one with only divider lines.)
  • Fixed crash which would occasionally occur when quitting after having run parallel multi-file searches or text factories.
  • Fixed a typo in the description of the documents drawer width in the applescript terminology.
  • Fixed a bug where process duplicates scripting was reading/writing the wrong keyword for ignore leading whitespace.
  • Resolved a bug where the sidebar in the open dialog was missing the scrollbar.
  • Corrected a bug where IndentationErrors weren’t parsed and reported by the Check Syntax command for python source files.
  • Fixed a bug where enter search string did the wrong thing for non-ascii input with grep disabled.
  • Fixed crash on 10.4 when dismissing the Page Setup dialog.
  • Fixed a regression which caused TextWrangler not to interoperate with ssh-agent helpers for sftp transactions.
  • Fixed yet another overzealous optimization bug in PCRE.
  • The internal URL passing and management has been reworked to eliminate problems caused by mishandling of special characters in user names, passwords, and paths for Open from FTP/SFTP and Save to FTP/SFTP.
  • Fixed a regression where Find Selection didn’t properly escape grep special characters if grep was turned on.
  • The spelling highlighting, if any, is now cleared from a word when you use the Ignore or Learn commands.
  • Fixed crash when using certain Emacs navigation gestures in the Quick Search window.
  • Fixed a bug where documents created from stationery weren’t remembered in the recent list until they were closed and re-opened.
  • Corrected the terminology for “process lines containing” to match what was actually returned.
  • Process Lines Containing when invoked by apple events will now always return the matching lines in the reply record.
  • Fixed a regression where the emacs bindings for move to beginning of line and move to end of line moved the insertion point but didn’t ensure that it was visible.
  • Fixed a bug where shift-up/down-arrow would select to the wrong column after using emacs move to beginning/end of line.
  • Fixed a bug in the Text Status prefs panel where Show All and Hide All didn’t toggle the Toggle Documents Drawer checkbox.
  • Worked around a bug in the Canon inkjet printer driver, which would cause the printer’s queue to stop whenever a print job was queued from TextWrangler, until the job was removed from the printer’s queue.
  • Made a change to the whitespace rules when uncommenting double-commented code.
  • Fixed a “cure is worse than the disease” bug in the scripting internals which would cause a crash when running scripts of the form:

if number of windows = 0 then — do something end if

  • Worked around behavior in the OS which would cause “^0”, “^1”, “^2”, and “^3” to be removed from strings displayed in the single-file Replace All results sheet.
  • It’s not unreasonable to assume that a file that begins with “<?php” contains PHP code, so the automatic language sniffer completes that intuitive leap and will treat such files appropriately.
  • Fixed a bug which would cause the file well in the Hex Dump dialog (and elsewhere) to sporadically refuse to accept files via drag and drop.
  • Fixed bug which caused networking errors to occur when trying to use non-passive FTP connections.
  • Fixed a bug in the text encoding opening/saving preferences such that if the default encoding had been disabled, the menu to change the default encoding would appear blank in certain situations.
  • Fixed bogus alert when dropping an already-installed plug-in onto the application.
  • Fixed bug which would cause a hang when printing or paginating a soft-wrapped document with “Print Selection Only” turned on.
  • Fixed a regression where the Copy URL command in the status bar didn’t copy the web url for files in a defined web site (but instead, its local file url.)
  • Tweaked the word-break logic used for double-clicking so as not to include newlines in runs of whitespace.
  • Fixed some issues with undoing rectangular drag’n’drops.
  • Fixed a bug in which, when doing a Save As of a text document, if the save failed for encoding reasons and you chose to change the encoding to UTF-8 and continue the save (in the error sheet), the document was incorrectly saved to the original location, not the save as location.
  • Fixed a bug that caused triple-clicking a blank line and dragging up to lose the blank line from the selection.
  • Any markers saved for a viewable text file are now shown on the Marker menu in browser windows (assuming the markers were present when the file was selected for viewing).
  • Fixed hang which would occur when doing a Open File by Name and none of the File Search folder paths pointed to valid directories.
  • Fixed an undo glitch that would occur if you did a Paste Column that appended beyond the end of the text and the text didn’t end with a CR.
  • Fixed a bug where TextWrangler could not unlock a file for editing which had a group id or user id who didn’t map to a name in the users and groups table.
  • Fixed bug in which reserved URL characters occurring in FTP/SFTP user names and/or passwords weren’t properly encoded before storage, leading to problems at retrieval and use.
  • Split the PHPModule:OpaqueStringsAndComments pref up into four separate prefs: one each for strings, block comments, line comments, and heredoc. They all default to TRUE except for PHPModule:OpaqueLineComments. This allows for stuff like:

<?php /// DO NOT EDIT ///////////////////// ?>p. which at least one user does and PHP apparently likes.

  • Fixed an undo glitch that would occur if Exchange Characters was done starting with an insertion point.
  • Fixed crash which would occur when refreshing the file list in a disk browser window.
  • Tweaked the C++ function scanner to change any carriage-returns embedded in function names, e.g.

XXX :: YYYp. to spaces before adding them to the function popup menu.

  • Fixed bug in the JavaScript function scanner in which comments between the function header and the function body prevented the function from being listed in the function popup.
  • Fixed bug in which the “Change Text Encoding” text factory action had no effect.
  • Fixed a bug where saving an untitled window, or doing a save as and attempting to save the name with a ; or ? in it would result in the saved filename being truncated.