Open bbassett opened 3 years ago
the workaround I found was to force a reload when you collapse. it's real heavy handed, but I haven't had the time to dig in deeper.
index d12ca3d..3914c4b 100644
--- a/dired.py
+++ b/dired.py
@@ -582,6 +582,7 @@ class DiredFold(TextCommand, DiredBaseCommand):
Very important, in case of actual modification of view, set valid dired_index setting
see DiredRefreshCommand docs for details
'''
+
def run(self, edit, update=None, index=None):
'''
update
@@ -698,6 +699,7 @@ class DiredFold(TextCommand, DiredBaseCommand):
v.erase(edit, indented_region)
v.set_read_only(True)
emit_event(u'fold', (self.view.id(), self.index[start_line - 1]), view=self.view)
+ v.run_command('dired_refresh')
class DiredUpCommand(TextCommand, DiredBaseCommand):
Why is this still needed in Sublime 4... I would ditch all other editors if they simply made the sidebar at least capable of switching sides...
I believe this bug is fixed in gwenzek's fork of this repo. Working great for me.
I was also getting disappearing entries when I press the left arrow key. The gwenzek fork fixes this for me.
Why is this still needed in Sublime 4... I would ditch all other editors if they simply made the sidebar at least capable of switching sides...
This is still better (faster) if you like to do everything by keyboard.
I believe this bug is fixed in gwenzek's fork of this repo. Working great for me.
I was also getting disappearing entries when I press the left arrow key. The gwenzek fork fixes this for me.
I tried installing the fork but that didnt work for me, error saying cannot iterate over None object. I downloaded the zip file from repo and renamed it with FileBrowser.sublime-package and added it in my Packages folder. Is that how fork installation of package is done ?
i just did git -clone
in terminal, in the packages/user directory.
git -clone https://github.com/gwenzek/SublimeFileBrowser.git
i still run into the same collapse of the folder . so i just combine dired_floder/dired_expand and dired_refresh this two command , it work fine for me. here is the example:
{
"keys": ["h"],
"command": "chain",
"args":
{
"commands":[
["dired_fold",],
["dired_refresh",],
],
},
"context": [
{ "key": "selector", "operator": "equal", "operand": "text.dired" },
{ "key": "setting.dired_rename_mode", "operand": false }
],
},
and use this chian command need install chain of command in (st2 or st3), as of st4 you can use that directly.
I'm not sure the best way to describe it, so i've set up an example and captured screenshots. This is with sublime build 4107, and i've ensured that SublimeFileBrowser is up to date.
example folders expanded:![Screenshot from 2021-06-16 22-42-50](https://user-images.githubusercontent.com/4523522/122332947-99a4f980-cef4-11eb-9618-b0b6faa26403.png)
then if I collapse folder![Screenshot from 2021-06-16 22-42-57](https://user-images.githubusercontent.com/4523522/122332977-a75a7f00-cef4-11eb-8955-6a579f964be0.png)
bravo_one
, Notice the doubled up carrots next to that folder.then if I do a refresh (![Screenshot from 2021-06-16 22-43-02](https://user-images.githubusercontent.com/4523522/122333040-c22cf380-cef4-11eb-884a-39677d02a140.png)
r
hotkey):