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.
We already commit the values when focus is lost, but it’s possible to initiate a find operation while focus is still in the find dialog text fields (via the menu).
Fixes#1183
Accessibility visual bounds for a range of a single softline should always
be also visually restricted to the softline. This is in order to be consistent
with implementation in Apple's apps (e.g. TextEdit).
Fixes#1149.
VoiceOver expects AXLineForIndex and AXRangeForLine to be consistent with
the movement by line using arrow up/down. That means it expects "line"
to mean softline.
VoiceOver also distinguishes commands to move by:
* paragraph (hardline): VO-Shift-PgUp/PgDown
* line (softline): VO-up/down
These are available when interacting with the text area (VO-Shift-down).
This commit therefore fixes the AXLineForIndex and AXRangeForLine
to make "line" mean "softline" instead of "hardline" as was the case
until now.
Now links in text (e.g. links to RFCs after installing the Hyperlink Helper bundle)
are announced as such with VoiceOver and it is possible to search for them with
VO-Cmd-L.
TODO:
* launching links with VO-Space is not supported yet, but Enter (Fn-Return)
does the same thing and is even more reliable.
* link URL is not supported, so it is not possible to learn the URL
with VO-Shift-U.
Previously only the text view’s background would affect the window’s opaque property, which made it impossible to have a solid text view background with a transparent gutter.
With responsive scrolling we need to return NO from isOpaque in order to get transparency and we cannot overload the scrollWheel: method (which we use to forward mouse events from the gutter to the text area).
I have also received a few crash reports that might be caused by responsive scrolling and one user has reported “sticky” scroll behavior.
So for now better just disable it, and see if it fixes all these issues.
Fixes#1135
Previously the character before the potential tab trigger had to be of a different character class. This is now only required when the first character of the tab trigger is a word character.
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].