Use the text foreground color for icons when the theme doesn’t provide a color and introduce ‘gutterSelectionIcons’ for the color of selected icons (defaults to selected foreground color).
Also changed the gutter selection border color to match the divider color (when it isn’t specified by the theme).
Previous solution didn’t handle soft wrapped lines.
This solution also scales better, as we no longer need to break up ranges and create an entry per selected line.
All the settings are now taken exclusively from the property files, so no more user defaults. This means users will have to set their theme and font again.
Drawing the border did not account for auxiliary views (presently used by incremental search). See issue #240.
It also did not properly layout the views when adding/removing such views, causing the border to disappear after having used incremental search.
Theme was no longer initialized by OakTextView, instead we relied on OakDocumentView to provide us with a theme, but if the user had no themes installed, it would never do so, leading to a crash when OTV uses a theme member function to obtain colors.
This closes issue #222.
If caret is at the first position of a place holder then we no longer look for tab expansions, should the user press tab.
This address the issue where a placeholder has optional content and the word to the left of this optional content is a tab trigger. Previously deleting the placeholder text and pressing tab would insert a new snippet, which would generally not be expected.
This closes issue #226.
When two neighboring characters have different character class or one is an alpha numeric character (excl. underscore) and the other is not, we consider this a valid boundary for a tab trigger.
This closes issue #157.
When invoking an action that would replace the marked text (“CJK edit buffer”) with a zero-length string, we would continue to be in “CJK” mode and thus allow the input manager to process the next key press.
In this situation though pressing e.g. escape or backspace would result in the input manager inserting the literal character code for this key.
So we now leave “CJK edit mode” if the “edit buffer” is empty.
There is still an issue though where, if the edit buffer is not empty, and the user press backspace, we correctly (?) ask the input manager to handle this key press, but the input manager will (wrongly) replace the selection with the literal backspace character.
We have our own version of interpretKeyEvents: because we want to augment the default key bindings dictionaries (and support multi-stroke key bindings).
When there is marked text (as part of inserting CJK or similar) the system’s version of interpretKeyEvents: seems to handle key bindings slightly different, for example where ↩ is normally bound to insertNewline:, this might be suppressed when the user has just selected a “translation”.