Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sublime Text 4 folder collapsing bug #158

Closed
bbassett opened this issue Jun 17, 2021 · 8 comments · May be fixed by #165
Closed

Sublime Text 4 folder collapsing bug #158

bbassett opened this issue Jun 17, 2021 · 8 comments · May be fixed by #165

Comments

@bbassett
Copy link

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

then if I collapse folder bravo_one, Notice the doubled up carrots next to that folder.
Screenshot from 2021-06-16 22-42-57

then if I do a refresh (r hotkey):
Screenshot from 2021-06-16 22-43-02

@bbassett
Copy link
Author

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):

@Ontopic
Copy link

Ontopic commented Jul 15, 2021

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...

@YBPN
Copy link

YBPN commented Aug 9, 2021

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.

@YBPN
Copy link

YBPN commented Aug 19, 2021

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.

@abdulrahman004
Copy link

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 ?

@YBPN
Copy link

YBPN commented Sep 26, 2021

i just did git -clone in terminal, in the packages/user directory.

git -clone https://github.com/gwenzek/SublimeFileBrowser.git

@hathawayANdRX105
Copy link

hathawayANdRX105 commented Feb 12, 2022

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.

kaste added a commit to kaste/SublimeFileBrowser that referenced this issue Oct 12, 2024
kaste added a commit to kaste/SublimeFileBrowser that referenced this issue Oct 12, 2024
@kaste
Copy link

kaste commented Oct 12, 2024

Fix is in #165

kaste added a commit to kaste/SublimeFileBrowser that referenced this issue Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants