Code Monkey home page Code Monkey logo

Comments (3)

aserowy avatar aserowy commented on August 13, 2024

hmm,

the documentation states that the option is overwriting regs * and +.

    -- sync clipboard overwrites vim.g.clipboard to handle * and +
    -- registers. If you sync your system clipboard without tmux, disable
    -- this option!
    sync_clipboard = true,

The " reg is a little bit special, because it gets overwritten with everything (even using setreg). Thus, syncing from tmux is overwriting " every time. We can only handle this case, if we read the " beforehand and set it back after the sync has taken place. The question is if it is applicable cause doing so would prevent dd in one nvim and p" in the second.

Kind regards
Alexander

PS: I leave the report open. You can close it or we use it to track a pr (if you need that option configurable).

from tmux.nvim.

kevintraver avatar kevintraver commented on August 13, 2024

Heres an example of where this in issue:

https://github.com/kyazdani42/nvim-tree.lua/blob/2e33b1654384921ec1cc9656a2018744f3f1ce81/lua/nvim-tree/fs.lua#L350

Notice nvim-tree copies to the " clipboard, but as soon tmux.nvim changes the window the copy_sync will override the " register

from tmux.nvim.

aserowy avatar aserowy commented on August 13, 2024

hmm, is this really the vim way for handling copies?
(plz dont get me wrong, im unsure what the vim way is in this situation)

We could get this fixed by syncing " in advance if the latest tmux buffer != " or ignore the " which would destroy dd -> change nvim instance -> p.

from tmux.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.