Skip to content

fix: Use fnameescape in default_open_file, nested = true in UILeave autocmd#77

Merged
mikew merged 2 commits intomainfrom
new-branch-1769918033
Feb 4, 2026
Merged

fix: Use fnameescape in default_open_file, nested = true in UILeave autocmd#77
mikew merged 2 commits intomainfrom
new-branch-1769918033

Conversation

@mikew
Copy link
Owner

@mikew mikew commented Feb 4, 2026

No description provided.


-- Exit if last client disconnects.
vim.api.nvim_create_autocmd('UILeave', {
nested = true,
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 fnameescape to properly escape filenames with special characters before opening them in a new tab
  • Added nested = true to the UILeave autocmd to allow the VimLeavePre autocmd to fire when qall is 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 mikew merged commit e5a5d47 into main Feb 4, 2026
12 checks passed
@mikew mikew deleted the new-branch-1769918033 branch February 4, 2026 23:46
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>
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.

1 participant