This reduced the file size with more than 90%.
Since the PDF files are mapped into TextMate’s address space, it results in a reduction of memory usage.
This change was prompted by the appearance of the `tabSizePopUp` button in the status bar. After dismissing the menu, the title would be disabled.
To ensure we do not have similar issues elsewhere, let's prefer the use of `NULL` to `nop:` when assigning the action for menu items unless we are sure that the menu item should always be disabled (e.g., the item is used as a label).
I mainly dislike the trailing zeroes because CGFloat used to be a float but 1.0 is a double (1.0f would be a float). So better to under-specify and let the compiler figure out the proper type.
This is only when caret is at a word, when not on a word, we do not respond to the cancelOperation: method. This way, pressing escape in a window where another responder implements cancel:/cancelOperation: (e.g. commit window) the key will be handled by the other responder (and presumably close the window).
For example the bundle item “Execute Line / Selection” will (without a selection) show as “Execute Line” in the menu, and now also if the command causes the error sheet to appear or the user press ⌃C / ⌘. to prematurely kill it.
The standard doesn’t care which side the keyword is placed on, but placing it on the right makes it easier to read types.
E.g. reading “int const* const” from right to left we get “const pointer to const integer”.
We want to disable “make selection visible” when the user is drag-selecting, though the previous check was too broad and would disable it if user opened a document via double click (e.g. a find in folder result).
Previously it would just make sure the selection was visible, so if the symbol was already visible, no scrolling/centering would take place.
For most actions we want to minimize scrolling since it makes it easier to keep track of the location in the document, but for the “Go to …” actions, we’re doing an absolute positioning rather than a relative jump, so it makes sense to always center.
For bookmarks, it’s only when choosing a specific bookmark from the Navigation menu that we center selection, not when using the next/previous bookmark actions.
For example when caret is at the beginning of the document, using “move left” would be a no-op and would cause “refresh” to be skipped, which meant if the caret was outside the visible area, no scroll would happen (to make it visible).
We now rely on the table view to obtain the entries and setup the data cell, which should make the code easier to use for other table views with a different data source implementation.
This is generally desired when the indent of a new line does not (necessarily) depend on lines above it, but where we otherwise do want indent corrections, e.g. HTML.
Previously only the most specialized callback(s) would run. For example creating a command scoped to “source” with “callback.document.will-save” for semantic class would never run for Ruby, Python, etc. because the Source bundle has a “Make Script Executable” callback scoped specifically to “source.ruby”, “source.python”, etc.
This is only done for code where running it twice would actually cause a problem.
Dispatch_once is favored over a static boolean only because it seems to carry slightly more semantic information.
Previously we would only record it if the user invoked a replace action from the find dialog, but the user may invoke “find” from the dialog and then subsequently “replace” via keyboard/menu (where we would not record the string).
For example if at column 60 on a line and moving up/down to a shorter line, we remember that column 60 is our desired column position. This would previously be used when returning a position for the caret, e.g. used with clipboard history pop-ups and bundle item disambiguation menus.
We shouldn’t use Apple’s prefix for our own constants. The actual value of the constant hasn’t been renamed yet as this requires “migration” (renaming the key in user defaults).
These items were relying on “first responder” which only works when focus is in the document view (since that’s the object that implements the actions).
This would manifest itself by showing the items disabled when focus was in the file browser, and for the grammar pop-up, the selected item (after opening the menu) would not be reverted back to the actual selected grammar in the document view.
Closes#1213
We were grabbing a const reference to a reference into a temporary object (result of editor_t::ranges), so the range used was effectively a pointer to a destroyed object.