fix: Use fnameescape in default_open_file, nested = true in UILeave autocmd#77
Merged
fix: Use fnameescape in default_open_file, nested = true in UILeave autocmd#77
fnameescape in default_open_file, nested = true in UILeave autocmd#77Conversation
mikew
commented
Feb 4, 2026
|
|
||
| -- Exit if last client disconnects. | ||
| vim.api.nvim_create_autocmd('UILeave', { | ||
| nested = true, |
Owner
Author
There was a problem hiding this comment.
Added "auto mkview/loadview" to my config and was having a hard time getting BufWinLeave to trigger as expected. This seemed to be the culprit?
There was a problem hiding this comment.
Pull request overview
This PR fixes two issues: proper escaping of filenames with special characters when opening files, and ensuring autocmd nesting to allow proper cleanup when the last UI client disconnects.
Changes:
- Added
fnameescapeto properly escape filenames with special characters before opening them in a new tab - Added
nested = trueto theUILeaveautocmd to allow theVimLeavePreautocmd to fire whenqallis executed
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/bridge_files/lua/rpc_open_file.lua | Escapes filenames with special characters using fnameescape before passing to tabedit |
| src/bridge_files/lua/init_nvrh.lua | Enables nested autocmd execution to ensure cleanup occurs when the last UI client disconnects |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mikew
pushed a commit
that referenced
this pull request
Feb 6, 2026
🤖 I have created a release *beep* *boop* --- ## [0.7.1](v0.7.0...v0.7.1) (2026-02-04) ### Bug Fixes * Use `fnameescape` in `default_open_file`, `nested = true` in `UILeave` autocmd ([#77](#77)) ([e5a5d47](e5a5d47)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.