You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When pasting a newly created file, I get a go panic.
To Reproduce
Steps to reproduce the behavior:
Start spf from a terminal window
$ spf
Open a second panel (<ctrl-p>)
Create a new file named "test-file.txt" in the new panel (c test-file.txt <enter>)
Switch to the previous panel (<tab>)
Create a new folder named destination (f destination<enter>)
Scroll to new folder, and open it (j... <enter>)
Move to second panel, select "test-file.txt" (<tab> j....)
Cut File from second panel (<ctrl-x>)
Observe that the file location is present in the "clipboard" panel
Move to first panel (<tab>)
Paste Item (<ctrl-v>)
See error
Expected behavior
I would expect to see test-file.txt in the left-hand panel, and not in the right hand panel.
Screenshots
panic: runtime error: index out of range [0] with length 0
goroutine 504 [running]:
github.com/MHNightCat/superfile/components.pasteItem({{{0x140000aa008, 0x2, 0x2}, 0x41, 0x0, 0x5}, {{0x140003ff340, 0x9, 0xe}, 0x0}, ...})
github.com/MHNightCat/superfile/components/global_controller.go:353 +0xbf4
github.com/MHNightCat/superfile/components.mainKey.func4()
github.com/MHNightCat/superfile/components/key_function.go:67 +0x44
created by github.com/MHNightCat/superfile/components.mainKey in goroutine 1
github.com/MHNightCat/superfile/components/key_function.go:66 +0x19b0
System information (please complete the following information):
OS: MacOS
Version 14.4.1
Superfile Version 1.1.1
Installed from primary homebrew repo
The text was updated successfully, but these errors were encountered:
@greylurk This bug has been fixed at 02c2ef6
And this bug only exists on MacOs, I don't have a Mac so I didn't test it but I think this change should fix the bug.
Describe the bug
When pasting a newly created file, I get a go panic.
To Reproduce
Steps to reproduce the behavior:
<ctrl-p>
)c test-file.txt <enter>
)<tab>
)f destination<enter>
)j... <enter>
)<tab> j....
)<ctrl-x>
)<tab>
)<ctrl-v>
)Expected behavior
I would expect to see
test-file.txt
in the left-hand panel, and not in the right hand panel.Screenshots
System information (please complete the following information):
The text was updated successfully, but these errors were encountered: