Skip to content

fix: search file parent after leaving TUI document - #957

Open
officialasishkumar wants to merge 1 commit into
charmbracelet:masterfrom
officialasishkumar:fix/tui-file-exit-search
Open

fix: search file parent after leaving TUI document#957
officialasishkumar wants to merge 1 commit into
charmbracelet:masterfrom
officialasishkumar:fix/tui-file-exit-search

Conversation

@officialasishkumar

Copy link
Copy Markdown

Summary

Fixes the empty file list shown after starting Glow directly on a file in TUI mode and pressing escape.

When Glow starts in document mode, the stash listing has not been populated yet. Unloading the document now starts the local file search, and file paths are resolved to their parent directory before scanning.

Testing

  • go test ./...
  • go test -race -covermode atomic ./...
  • git diff --check

Fixes #803

When Glow starts directly in TUI document mode, the file listing is never populated. Pressing escape returns to an empty stash view, and the local search path still points at the opened file instead of a searchable directory.

Start the local file search when unloading an initially opened document, and resolve file paths to their parent directory before scanning.

Fixes charmbracelet#803
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 this pull request may close these issues.

No files found after exiting glow -t docs/index.md

1 participant