aboutsummaryrefslogtreecommitdiff
path: root/data/plugins/treeview.lua
AgeCommit message (Collapse)Author
2023-11-29Fix `dirmonitor` sorting issues (#1599)Guldoman
* 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`.
2023-05-20Add mouse grab (#1501)Guldoman
* 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.
2023-03-16Make `TreeView` follow the current tab (#1411)Guldoman
* 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.
2023-02-06NagView: properly rescale on scale change (#1379)Jefferson González
* drop font option since style.font is always used
2023-01-30Context menu fixes and keyboard navigation (#1338)vqn
* 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
2023-01-30Abstracted open_doc out to allow for more easy overriding. (#1344)Adam
2022-12-26Allow `TreeView` file operation commands when focused (#1256)Guldoman
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`.
2022-10-15Refactor scrollbar into its own file (#1124)Guldoman
* Move scrollbar to its own file * Don't call `Scrollbar` functions if `View` is not scrollable * Allow horizontal scrolling in `Scrollbar` * Add horizontal scrollbar to `View` * Add `root:horizontal-scroll` command with `shift+wheel` keymap * Prioritize vertical scrollbar hover * Don't send mouse movement to vertical scrollbar when dragging horizontal one * Fix clicking on horizontal scrollbar track * Implement `start` scrollbar alignment * Add documentation to `Scrollbar` * Make `DocView` infinitely scrollable horizontally * Handle horizontal scroll SDL event
2022-10-04Fixing minor bug relating to TreeView's cache. (#1136)Adam
Reviewed by Guldo; should fix things, merging.
2022-09-14Added in simple directory search to treeview. (#1110)Adam
2022-08-21Make predicate for some `TreeView` commands stricterGuldoman
This avoids performing the `treeview:new-folder` command on ctrl + double click. This happens because `ctrl+lclick` (which is the keybinding for `treeview:new-folder`) is triggered also by ctrl + double click, which isn't captured by anything else.
2022-08-16Allow command predicates to manage parameters passed to the commandsGuldoman
When a command is performed with parameters, those are now passed to the predicate. The predicate can then return, after the validity boolean, any other value that will then be passed to the actual command. If the predicate only returns the validity boolean, the original parameters are passed through to the actual command. This allows predicates to manipulate the received parameters, and allows them to pass the result of an expensive computation to the actual command, which won't have to recalculate it. String and table predicates will now also return `core.active_view`.
2022-08-09Steps to generalize toolbar and treeview. (#1088)Adam
2022-06-22treeview: scale fallback sizes as pointed out by @Guldomanjgmdev
2022-06-22treeview: restore ability to disable toolbarviewjgmdev
2022-06-17plugin treeview: fix crashjgmdev
When the max_project_files is set to a higher value than the allowed system maximum file descriptors, and opening a project directory that causes dirmonitor to open a watch on a lot of files or directories, at least on MacOSX it causes all system.* file functions to return nil (for too many opened files) which breaks the project files scan.
2022-06-07initial documentation for better code completionjgmdev
2022-06-07Merge branch 'master' into PR_commandview_options2Jefferson González
2022-06-02Add `text` and `select_text` to `CommandView` optionsGuldoman
2022-06-01Make `TreeView` more multi-project-dir awareGuldoman
2022-06-01Add `TreeView` helper functions to get previous/next itemGuldoman
2022-05-31Merge pull request #1004 from Guldoman/PR_commandview_optionsJefferson González
Add options table to `CommandView:enter`
2022-05-31plugins: dropped --lite-xl version tagjgmdev
2022-05-30Use new `CommandView:enter` options tableGuldoman
2022-05-23plugins: added settings gui supportjgmdev
2022-05-09Merge branch 'master' into master-2.1Adam
2022-05-09TreeView Changes (#898)Adam
* Change to 1 click as per RFC on discord, with 100% in favour. * Added in the ability to specify as a view name, so it doesn't modify the title, and also fixed a bug where if you clicked *over* the amount of times your config says, it wouldn't regsiter. * Changed plugin to use keymap.
2022-05-03Updated treeview to match convention.Adam Harrison
2022-04-26TreeView Changes (#898)Adam
* Change to 1 click as per RFC on discord, with 100% in favour. * Added in the ability to specify as a view name, so it doesn't modify the title, and also fixed a bug where if you clicked *over* the amount of times your config says, it wouldn't regsiter. * Changed plugin to use keymap.
2022-04-25Add animation categories to enable finer transitions control (#941)Guldoman
* Allow finer control over transitions * Add categories to transitions
2022-04-03Bumping version numbers.Adam Harrison
2022-03-20treeview: add proper predicate for delete commandjgmdev
2022-03-20treeview: use root_view:get_primary_node().active_view for focus.jgmdev
2022-03-20treeview: also handle focus change from mouse and then commandviewjgmdev
2022-03-20Merge pull request #890 from Guldoman/PR_treeview_fix_scrollJefferson González
Fix `TreeView` scroll via scrollbar
2022-03-20Hide hovered `TreeView` item when dragging the scrollbarGuldoman
2022-03-20Don't specify delta movement when simulating `TreeView:on_mouse_moved`Guldoman
2022-03-19treeview: better handle previous view when focus/unfocus from CommandViewjgmdev
2022-03-19treeview: move delete command to proper predicatejgmdev
2022-03-18Make `treeview:collapse` select parent if current item can't collapseGuldoman
2022-03-18Don't draw `treeview` tooltip if its position is not definedGuldoman
2022-03-18treeview: fix crash on tooltip.x been niljgmdev
2022-03-18treeview: fixed github merging errorjgmdev
2022-03-18Merge pull request #770 from takase1121/treeview-initial-sizeJefferson González
add option for treeview initial size
2022-03-18treeview: added @AlexSol suggestionsjgmdev
* suggestions included collapse, expand and focus * also added missing common.merge * some other minor fixes
2022-03-18add selections in treeviewtakase1121
2022-03-07plugin treeview: skip rootview events if not visible.treeview-fixjgmdev
2022-03-06Fix Project Scanning (#746)Adam
Removed dmon, and replaced with logic that works across Linux, Mac, FreeBSD and Windows. Have tested on all platforms, and seems to work. Co-authored-by: Jan200101 <sentrycraft123@gmail.com>
2022-01-19Merge branch 'master-2.0'Francesco Abbate
2022-01-09Fix undue asserts in dmon_extraFrancesco Abbate
Some asserts are placed in case that can effectively occur so we remove the assertion and we return false. In turn we adapt the logic accordingly so when false is returned to add a watch we do not open that directory.