Skip to content

Commit

Permalink
Improved create-file command
Browse files Browse the repository at this point in the history
  • Loading branch information
Nimaoth committed Feb 3, 2025
1 parent 0e7a85c commit 6977776
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/app.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1966,7 +1966,13 @@ proc exploreFiles*(self: App, root: string = "", showVFS: bool = false, normaliz
log lvlError, fmt"Failed to parse file info from item: {item}"
return true

self.commands.openCommandLine("create-file \\" & currentDirectory[])
let dir = currentDirectory[]
self.commands.openCommandLine "", proc(command: Option[string]): bool =
if command.getSome(path):
if path.isAbsolute:
self.createFile(path)
else:
self.createFile(dir // path)

self.layout.pushPopup popup

Expand Down

0 comments on commit 6977776

Please sign in to comment.