ozansz / gls

Minimal file manager with terminal UI #Go
https://sazak.io/gls-file-manager-on-terminal-with-go/
MIT License
68 stars 5 forks source link

Implement create file shortcut #5

Closed gozeloglu closed 2 years ago

gozeloglu commented 2 years ago

Current problem: The tree is not updated after creating a new file. We don't see the newly created file. I am open to getting help with this problem.

Signed-off-by: Gökhan Özeloğlu gokhan.ozeloglu@deliveryhero.com

gozeloglu commented 2 years ago

Hi @ozansz. Sorry for being late to make PR ready for review. As I mentioned above, there is a problem. I thought I was able to solve it, but, couldn't understand the reason. If you have a guess about the bug, I'd like to hear it.

ozansz commented 2 years ago

Hi @ozansz. Sorry for being late to make PR ready for review. As I mentioned above, there is a problem. I thought I was able to solve it, but, couldn't understand the reason. If you have a guess about the bug, I'd like to hear it.

Hi, thanks for the PR! I will check and try to find why the tree is not updated

ozansz commented 2 years ago

I've spotted the issue: the function createNewFile was not actually creating a *Node inside the virtual file tree, so after the UI update, the tree was the same. I also done some minor updates on your branch, I think it works now. Feel free to add any other updates to the code 😁

gozeloglu commented 2 years ago

I've spotted the issue: the function createNewFile was not actually creating a *Node inside the virtual file tree, so after the UI update, the tree was the same. I also done some minor updates on your branch, I think it works now. Feel free to add any other updates to the code 😁

Thank you for your help 💯 I tried and it works on my machine. In the last commit, I just renamed a variable. It seems the PR is ready to merge.