* Make command palette item scrolling more natural
Also add a config option for the maximum number of visible entries in the command palette.
* Make `autocomplete` item scrolling more natural
* Improve `autocomplete` suggestions box sizing
This avoids that the box gets too big because of non-visible items, and makes it reactive to window sizing.
* Draw ellipsis when `autocomplete` entries aren't fully visible
* Improve number highlighting for python syntax highlighting
Adds support for octal and binary representation, as well uppercase characters (X, B and O)
* add underscore and negative hex/oct/bin value support
* Removed | from pattern
* Use `PATHSEP` in path-related functions
* Don't stop on digits when getting the common part in `system.path_compare`
* Avoid sorting multiple times in `dirwatch.get_directory_files`
This also fixes the timeout detection in `recurse_pred`.
* Add icons support to autocomplete plugin
* Removed redundant flag check
* Added support for non syntax colors
* Assert if color name not in style.syntax
* Autocomplete plugin improvements
* Support suggestion symbols scoping
- global: all open documents
- local: current document
- related: all open documents with same syntax
- none: language syntax symbols only
* Register style.syntax[] entries as icons
* Other related fixes
* Add mouse grab
We now also send mouse movement events only to the interested view.
* Add deprecation messages handler
* Make various `View`s respect `on_mouse_left`
* `StatusView`
* `TitleView`
* `TreeView`
* `ToolbarView`
* Fix scrollbar in `TreeView` not updating
We were in some cases sending outdated mouse positions to the scrollbar,
which made it think that the mouse was hovering it.
This also updates the hovered item more responsively during scroll.
* The comment patterns had to come before the string ones
* The smallest indentation size is now taken into consideration even if
it only occurs once, we just make sure its size is more than 1 space.
* Restore horizontal scroll position after scale change
* Consider `View` horizontal size when restoring horizontal scroll
This is needed because `View:get_h_scrollable_size` includes the
horizontal size, while `View.scroll.x` doesn't.
Instead of completely disabling them, we now use their internal toggle.
Also moved `drawwhitespace` commands inside the plugin.
---
* Fixed bug where commands would show even when plugin was disbled. Also removed antiquated way of disabling.
* Fixed typos.
* Also moved trimwhitespace out of config, if it already has a default enabled value of false.
* Changed documentation.
* Clarified comments.
* Make `TreeView` follow the current tab
* Use `TreeView:toggle_expand` in `TreeView:set_selection_to_path`
We can't use `item.expanded` directly because we need to update the
cached tree structure.
* fix Doc contextmenu not registering commands if scale plugin is not found
* fix TreeView contextmenu commands not working if the mouse hovers DocView
* add keyboard navigation to TreeView contextmenu
* fix incorrect contextmenu predicate
* refactor: remove sort_positions usage
* refactor: move draw conditional to has_any_selection and other changes
- snake case (sssss)
- break after finding selection
* fix: typo of config plugins
* fix: do check for show selected only properly
* feat: only draw within selection per substitution
* `drawwhitespace`: Make `show_selected_only` work properly
---------
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
Impacts `treeview:{rename,new-file,new-folder,open-in-system}`.
Previously those were only available when the mouse was over the
`TreeView`.
They now use the same predicate as `treeview:delete`.
When multiple substitution kinds are present in the same line, they're
placed in the cache in an order that's spatially consistent only between
items of the same kind.
Because we stopped drawing after we reached the first invisible
substitution, the subsequent kinds weren't drawn even if they should
have been.