nushell / nushell/reedline

create buffers with different names to avoid swap clashing in Vim

Open
#605 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
818
Forks
249
Avg merge
4d 14h
Merged PRs (30d)
30

Description

because Reedline always creates the same buffer with control + o in Nushell, i end up in an annoying situation in Neovim where the two buffers are in conflict because opened at the same time in two instances of Neovim...

this is because of the swap mechanism 🤔

i propose to create different buffers each time, e.g. in /tmp/reedline_buffers/{some_random_name}.nu instead of the current /tmp/reedline_buffer.nu defined in src/engine.rs 😋

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/engine.rs around line 1524, where the current /tmp/reedline_buffer.nu path is defined, and trace how control+o creates and opens the buffer. Done means successive buffers use distinct temporary names so simultaneous Neovim instances do not clash through swap files.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.