Skip to content

Conversation

@echobt
Copy link
Contributor

@echobt echobt commented Jan 20, 2026

This PR fixes the issue where pressing Enter in the TUI results view would only display a status message instead of opening the file.

Changes

  • Implemented file opening logic using the $EDITOR environment variable (defaulting to nano).
  • Added support for jumping to the specific line number for common editors (vi, nano, emacs).
  • TUI temporarily suspends raw mode to allow the editor to take over the terminal.
  • TUI state is restored after the editor exits.

How to test

  1. Run vgrep tui
  2. Perform a search
  3. Select a result and press Enter
  4. The file should open in your default editor at the correct line.

This change implements the ability to open selected files in the default editor when pressing Enter in the TUI results view. It respects the $EDITOR environment variable and attempts to jump to the matching line number for common editors (vi, nano, emacs).
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.

2 participants