Commit Graph

115 Commits

Author SHA1 Message Date
jgmdev e0859e1e39 treeview: scale fallback sizes as pointed out by @Guldoman 2022-06-22 01:35:10 -04:00
jgmdev 7b411c3ea9 treeview: restore ability to disable toolbarview 2022-06-22 00:42:26 -04:00
jgmdev 173dd3aeb4 plugin treeview: fix crash
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-17 15:35:23 -04:00
jgmdev 3f206db69a initial documentation for better code completion 2022-06-07 22:09:34 -04:00
Jefferson González 439c27447f
Merge branch 'master' into PR_commandview_options2 2022-06-07 19:03:55 -04:00
Guldoman ec58b1f0bd
Add `text` and `select_text` to `CommandView` options 2022-06-02 19:30:51 +02:00
Guldoman 730ea0c91b
Make `TreeView` more multi-project-dir aware 2022-06-01 06:58:04 +02:00
Guldoman e94c996a26
Add `TreeView` helper functions to get previous/next item 2022-06-01 06:58:04 +02:00
Jefferson González c09715d0e1
Merge pull request #1004 from Guldoman/PR_commandview_options
Add options table to `CommandView:enter`
2022-05-31 16:38:36 -04:00
jgmdev 2d8a15f3ab plugins: dropped --lite-xl version tag 2022-05-31 16:34:14 -04:00
Guldoman 11e27c6fda
Use new `CommandView:enter` options table 2022-05-30 22:08:13 +02:00
jgmdev 8bbca7c0b0 plugins: added settings gui support 2022-05-23 17:50:10 -04:00
Adam 6229f74ccd
Merge branch 'master' into master-2.1 2022-05-09 21:36:10 -04:00
Adam f1f8a9b3f2 TreeView Changes (#898)
* 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-09 21:33:22 -04:00
Adam Harrison 8345a04d04 Updated treeview to match convention. 2022-05-03 23:13:49 -04:00
Adam 4934e741b3
TreeView Changes (#898)
* 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-26 18:29:05 -04:00
Guldoman f42dbb0060
Add animation categories to enable finer transitions control (#941)
* Allow finer control over transitions

* Add categories to transitions
2022-04-25 20:35:35 -04:00
Adam Harrison 45a0382d50 Bumping version numbers. 2022-04-03 16:44:02 -04:00
jgmdev bbac4d1560 treeview: add proper predicate for delete command 2022-03-20 01:58:39 -04:00
jgmdev c3bcf68851 treeview: use root_view:get_primary_node().active_view for focus. 2022-03-20 01:05:07 -04:00
jgmdev f0cc973e38 treeview: also handle focus change from mouse and then commandview 2022-03-20 00:53:13 -04:00
Jefferson González ad25216de7
Merge pull request #890 from Guldoman/PR_treeview_fix_scroll
Fix `TreeView` scroll via scrollbar
2022-03-20 00:31:26 -04:00
Guldoman 46f9be2960
Hide hovered `TreeView` item when dragging the scrollbar 2022-03-20 04:46:57 +01:00
Guldoman 699655bebf
Don't specify delta movement when simulating `TreeView:on_mouse_moved` 2022-03-20 04:45:14 +01:00
jgmdev b741c204db treeview: better handle previous view when focus/unfocus from CommandView 2022-03-19 23:10:26 -04:00
jgmdev 3ffabced62 treeview: move delete command to proper predicate 2022-03-19 22:33:41 -04:00
Guldoman 3ec0f38446
Make `treeview:collapse` select parent if current item can't collapse 2022-03-18 16:16:55 +01:00
Guldoman 2d5af22dc9
Don't draw `treeview` tooltip if its position is not defined 2022-03-18 16:10:24 +01:00
jgmdev a7fc7b4408 treeview: fix crash on tooltip.x been nil 2022-03-18 06:02:48 -04:00
jgmdev e8427ae168 treeview: fixed github merging error 2022-03-18 04:23:32 -04:00
Jefferson González 5a63f6dc2e
Merge pull request #770 from takase1121/treeview-initial-size
add option for treeview initial size
2022-03-18 04:18:56 -04:00
jgmdev 02f6dcc07d treeview: added @AlexSol suggestions
* suggestions included collapse, expand and focus
* also added missing common.merge
* some other minor fixes
2022-03-18 03:57:14 -04:00
takase1121 d5da711b6f add selections in treeview 2022-03-18 03:11:13 -04:00
jgmdev 48e86bb117 plugin treeview: skip rootview events if not visible. 2022-03-07 16:52:32 -04:00
Adam f85612e0f0
Fix Project Scanning (#746)
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-03-06 00:59:22 -05:00
Francesco Abbate f6a0e12e31 Merge branch 'master-2.0' 2022-01-19 20:31:33 +01:00
Francesco Abbate 7473fbf32c Fix undue asserts in dmon_extra
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.
2022-01-09 23:26:11 +01:00
Francesco Abbate 143b389365 Clear TreeView cache when closing project 2022-01-07 10:41:18 +01:00
Francesco Abbate 05b003eeb5 Avoid references to project's dir in TreeView
It is not a good practice to keep a reference to the project's
directory object outside of the "core" module itself.

The TreeView was using such a reference in the cache item for each
file or directory entry. Replace the reference to the object with
the absolute name of the project directory.
2021-12-28 14:36:21 +01:00
takase1121 16df6d8bce
add option for initial size 2021-12-24 21:32:28 +08:00
Francesco Abbate 9155be7a22
Ensure TreeView cache entry is removed on delete
Address issue:

https://github.com/lite-xl/lite-xl/issues/689

Attempt to provide a more accurate fix to commit:

59f64088e1

For this latter what happens is that any change inside a directory
cause the corresponding entry to be folded in the TreeView.

The new change is more accurate because we remove only the stale
entry corresponding to the delete event and we do not reset the
cache of the parent directory using the modify event.
2021-12-22 23:40:54 +01:00
Guldoman 9e7bdf49e9
Revert "Merge pull request #697 from Guldoman/treeview_remove_changed"
This reverts commit 4e078cc217, reversing
changes made to 0c488c9492.
2021-12-22 23:39:26 +01:00
Francesco Abbate 37c00c877a Ensure TreeView cache entry is removed on delete
Address issue:

https://github.com/lite-xl/lite-xl/issues/689

Attempt to provide a more accurate fix to commit:

59f64088e1

For this latter what happens is that any change inside a directory
cause the corresponding entry to be folded in the TreeView.

The new change is more accurate because we remove only the stale
entry corresponding to the delete event and we do not reset the
cache of the parent directory using the modify event.
2021-12-20 11:03:49 +01:00
Adam 997b3efbb7
Merge pull request #708 from Guldoman/treeview_styling
Allow `TreeView` item icon and text styling
2021-12-12 12:04:59 -05:00
Adam Harrison 7b55470159 Fixed treeview clicking not being caught. 2021-12-11 17:51:19 -05:00
Guldoman c16d6b3d8d
Avoid drawing hidden `TreeView` items 2021-12-07 21:45:20 +01:00
Guldoman fdb29f28cf
Split `TreeView:draw` into multiple functions
This allows plugins to override each aspect of TreeView item drawing.
2021-12-07 21:44:20 +01:00
Guldoman d7afcb08b1
Check the entire path in `TreeView` `new-file` and `new-folder` commands 2021-11-30 01:11:35 +01:00
Guldoman e500368ce4
Allow `TreeView` item icon and text styling 2021-11-29 23:36:49 +01:00
Guldoman ef4c02ab0e
Check the entire path in `TreeView` predicate 2021-11-28 07:16:53 +01:00