Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: add terminal window validation and configurable persistence#60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
alvarosevilla95 wants to merge2 commits intocoder:main
base:main
Choose a base branch
Loading
fromalvarosevilla95:fix/terminal-window-validation

Conversation

alvarosevilla95
Copy link

@alvarosevilla95alvarosevilla95 commentedJun 22, 2025
edited
Loading

Summary

Fixes terminal window validation issues and adds configurable terminal persistence.

Changes Made

  1. Window Validation Fix (Snacks Provider)

    • Adds validation to check if the terminal window is still valid before attempting to focus it
    • If the window was closed, reopens the terminal instead of throwing an error
    • Prevents crashes when the terminal window is manually closed and the user tries to toggle focus
  2. Configurable Terminal Persistence (Native Provider)

    • Addspreserve_on_close configuration option (default:false)
    • Whentrue, preserves terminal process when window is manually closed (native provider only)
    • Maintains backward compatibility with existing behavior
    • Provides same functionality as snacks provider but makes it configurable

Configuration

Users can now enable terminal persistence by setting:

require('claudecode').setup({terminal= {preserve_on_close=true,-- Preserve terminal process when window is closed-- other terminal options...  }})

Default behavior (preserve_on_close = false): Terminal buffer is wiped when window is closed (original behavior)
New behavior (preserve_on_close = true): Terminal buffer is hidden when window is closed, preserving the process for later restoration

Technical Details

  • Both providers now handle closed terminal windows gracefully
  • Terminal processes are preserved during programmatic hiding (toggle functions) regardless of the setting
  • Thepreserve_on_close setting only affects manual window closing (X button,:q, etc.)
  • Comprehensive documentation added to README for the new configuration option

@alvarosevilla95alvarosevilla95 changed the titlefix: add window validation in terminal focus togglefix: add terminal window validation and configurable persistenceJun 22, 2025
Adds validation to check if the terminal window is still valid beforeattempting to focus it. If the window was closed, reopens the terminalinstead of throwing an error.This prevents crashes when the terminal window is manually closed andthe user tries to toggle focus.
Adds preserve_on_close option to terminal configuration that allows usersto preserve terminal processes when windows are manually closed. Defaultsto false for backward compatibility.- Add preserve_on_close config option (default: false)- Update native provider to use configurable buffer behavior- Fix hide_terminal to preserve process during programmatic hiding- Update README with new configuration option and documentationThis provides the same functionality as the snacks provider fix but makesit configurable so users can choose their preferred behavior.
@alvarosevilla95alvarosevilla95force-pushed thefix/terminal-window-validation branch frome942ac9 to8101128CompareJune 22, 2025 20:52
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@alvarosevilla95

[8]ページ先頭

©2009-2025 Movatter.jp