Skip to content

Commit

Permalink
fixed some small bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nimaoth committed Oct 25, 2024
1 parent c4b51b9 commit e43fb6c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
Binary file modified config/wasm/harpoon.wasm
Binary file not shown.
Binary file modified config/wasm/keybindings_plugin.wasm
Binary file not shown.
Binary file modified config/wasm/vscode_config_plugin.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion src/app.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1929,7 +1929,7 @@ proc getItemsFromDirectory(vfs: VFS, workspace: Workspace, directory: string, sh

var detail = directory
if showVFS:
let (vfs, rel) = vfs.getVFS(directory // name, 1)
let (vfs, _) = vfs.getVFS(directory // name, 1)
detail.add "\t"
detail.add vfs.name

Expand Down
3 changes: 2 additions & 1 deletion src/finder/file_previewer.nim
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ proc loadAsync(self: FilePreviewer): Future[void] {.async.} =

logScope lvlInfo, &"loadAsync '{path}'"

let document = if self.currentStaged or not self.reuseExistingDocuments:
let isFile = self.currentIsFile.get(true)
let document = if self.currentStaged or not self.reuseExistingDocuments or not isFile:
Document.none
elif self.openNewDocuments:
self.editors.getOrOpenDocument(path)
Expand Down
8 changes: 5 additions & 3 deletions src/vfs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -333,13 +333,15 @@ proc setFileAttributes*(self: VFS, path: string, attributes: FileAttributes): Fu

proc getDirectoryListing*(self: VFS, path: string): Future[DirectoryListing] {.async: (raises: []).} =
let (vfs, relativePath) = self.getVFS(path)
if vfs == self:
result = await self.getDirectoryListingImpl(relativePath)
else:
if vfs == self:
result = await self.getDirectoryListingImpl(relativePath)
else:
result = await vfs.getDirectoryListing(relativePath)

if path.len == 0:
for m in self.mounts:
if m.prefix == path:
continue
result.folders.add m.prefix

proc copyFile*(self: VFS, src: string, dest: string): Future[void] {.async: (raises: [IOError]).} =
Expand Down

0 comments on commit e43fb6c

Please sign in to comment.