By using the menu item’s indentation level property it is possible to “type to select” items, which previously would not work for items that had leading em-space as a prefix.
Closes#806.
- Set compression priorities to collapse fields in a desirable order.
- Increase default width of selection string to fit 8888:88
- Set grammar popup to the width of the active grammar and give is sensible minimum/maximum widths.
- Set a maximum width for the tab size menu.
Previously the gutter and the text view were set to have the same height (via constraints). Though when the horizontal scrollbar is visible then the gutter should technically be made a little taller to account for the extra bottom margin. Not adding this space was causing problems.
Fixes#773.
Previously we would set it for the current file (via path) and the current scope plus parent scopes.
The latter wasn’t useful, as the file type is not indicative of the language used, and as scoped settings presently have higher priority than path-based settings, it could lead to the wrong language being used, even when language was explicitly set for a folder.
Now, when changing language via Edit → Spelling menu, we set the language globally (so default for all new documents without more specific settings), all files in the current document’s folder, and the document itself.
The undo manager will change the titles (e.g. “Undo Rename”) when it’s first responder, so we need to change them back, when the text view is first responder.
The reason for this is that NSTextField will draw itself in the “faded” state (for non-key windows) unless some of its parent views are marked opaque.
The previous problem with not having the parent views opaque (see da3a91a7bb) seems to have been solved by setting the autohidesScrollers property to YES.
Using instances with static storage in Objective-C files result in the following warning (starting with clang 425.0.24):
ld: warning: direct access in […] to global weak symbol […] means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
The symbol chooser is now owned by DocumentView instead of DocumentController.
The symbol chooser does not know about its owner and is not an observer of any notifications. Instead it has a property for “document” and one for “selectionString”. It is the owners job to update these properties (i.e. when switching document or changing the selection).
This isn’t ideal but better than a potential crash (following the next edit). A better solution will have to wait to a larger refactoring (which should also consider multiple editors working on the same buffer).
Closes#186.
When user drag-selects and moves mouse outside the viewport, we do not want to use ‘ensureSelectionIsInVisibleArea:’ because that method looks only on the selection, particularly the non-anchored end-point (and works differently for unanchored selections). Instead we want to scroll the point corresponding to the mouse position inside the viewport.
Fixes#475.
Since styles_for_scope effectively ignore the font parameters (and instead return styles based on the font parameters used when the cache entry was created) it is a better design to have theme_t own the font. This way, changing it can do the proper cache invalidation.
A minor downside is that we can now change the font of the theme without also changing the layout’s font, which wouldn’t cause proper layout invalidation — since layout_t owns theme_t though, users of a layout should always change font via layout_t (which will then change it in the theme).
Also, themes cannot be shared between views that wish to use different font settings.
Removed the ability to specify wether documents should open in current window or a new window — all documents opened via this API will go through the same algorithm to find where the documents should end up (more choice is just adding confusion and complexity).
We may use OakDocumentView in a context where we don’t immediately assign it a document, or we wish to “overwrite” its default document with an untitled document that we create.
If the document view holds its own untitled document then the global counter includes that and the one we create is one higher than expected.
Seeing a few crashes related to CFRetain() called from CTFontCreateWithName(). My guess is that a nil font results from a bad/corrupted config file, so the actual fix might be to ensure we have a font (at a higher level).