Hyper: Random clipboard dumping / pasting into vim buffer when opening in Hyper?

Created on 10 Apr 2018  Â·  9Comments  Â·  Source: vercel/hyper

  • [x] I am on the latest Hyper.app version
  • [x] I have searched the issues of this repo and believe that this is not a duplicate

  • OS version and name: MacOS High Sierra 10.13.3

  • Hyper.app version: Hyper 2.0.0-canary.16
  • Link of a Gist with the contents of your .hyper.js: https://gist.github.com/JesseLeite/5a46d38452fba5e08e28627d2d0954d7
  • Relevant information from devtools _(CMD+ALT+I on macOS, CTRL+SHIFT+I elsewhere)_:
  • The issue is reproducible in vanilla Hyper.app: Yes, just tested and it happens with a freshly generated .hyper.js file in canary.

Issue

Randomly when opening vim, hyper seems to immediately paste what's in my clipboard to the open buffer. It also seems to paste a random number of times. Sometimes it's 6 times, others it's only one time. I can then hold u to undo everything, but it's quite annoying. It doesn't always happen, but happens quite frequently when I've recently copied something to my clipboard. I'd also like to note that it has never happened with iTerm or Terminal.app, but has been happening for the last 6+ months since I started using Hyper 😢

2018-04-10 09 58 53

Do any other vim users have this issue?

Compatibility

Most helpful comment

Found this while debugging the same issue in a different terminal emulator. Seems to be a vim bug, some kind of race condition around interpreting terminal data as commands when interrogating it for cursor styles.

The best information I was able to find is on StackExchange here: Strange vim xterm interaction auto insertion of register when opening file

The relevant vim issue seems to be https://github.com/vim/vim/issues/2238

Adding this to your .vimrc does fix this problem by disabling the vim feature in question.

set t_RS=

ʅʕ•ᴥ•ʔʃ

All 9 comments

😮 I have no idea...
Can you attach your .vimrc?

Sure! My .vimrc. I guess I never assumed it would be something in my .vimrc, since it never happens in iTerm or Terminal.app. But who knows.

I would have to test for a few days, but I just commented out everything and slowly re-enabled things. It might be this 😱

nnoremap <silent> <Esc> :nohlsearch<CR><Esc>

But how?

I've actually had this issue before but I couldn't find a fix. In the end, I installed MacVim and used that as the version of vim to use instead of the macOS built-in version.

I haven't had it happen since disabling my Esc mapping (see above). Not sure how these could be related, or how it only seemed to happen in Hyper though 😅

Found this while debugging the same issue in a different terminal emulator. Seems to be a vim bug, some kind of race condition around interpreting terminal data as commands when interrogating it for cursor styles.

The best information I was able to find is on StackExchange here: Strange vim xterm interaction auto insertion of register when opening file

The relevant vim issue seems to be https://github.com/vim/vim/issues/2238

Adding this to your .vimrc does fix this problem by disabling the vim feature in question.

set t_RS=

ʅʕ•ᴥ•ʔʃ

FWIW, I'm have the exact issue as @JesseLeite and removing nnoremap <esc> :noh<return><esc> fixes it but @danielmendel's suggestion to add set t_RS= doesn't have seem to have any effect.

Same @davemkirk. I think I'm just going to have to map :noh to something else.

Man, this is still a nagging issue for me. I mostly notice it when opening vim and quickly opening my fzf.vim fuzzy finder to open a file 🤔

Screen Shot on 2019-03-08 at 15-02-58

Was this page helpful?
0 / 5 - 0 ratings

Related issues

daenuprobst picture daenuprobst  Â·  3Comments

dbkaplun picture dbkaplun  Â·  3Comments

alejandrofloresm picture alejandrofloresm  Â·  3Comments

hxnt picture hxnt  Â·  3Comments

eoinmurray picture eoinmurray  Â·  3Comments