GithubHelp home page GithubHelp logo

Comments (9)

jamessan avatar jamessan commented on May 20, 2024

Both of these are likely items that need to be handled in vim-tmux-focus-events. That being said, I'll try to provide some information on what might be going on.

For the contents echoing at the bottom of the screen, my best guess is that it's an odd interaction with BufReadCmd. As a simple test, you could try these steps and see if you can reproduce similar behavior:

$ vim
:au BufReadCmd .vimrc :exe '0r !cat '.shellescape(expand('<afile>'), 1) | $d _ | exe 'doau BufReadPost '.fnameescape(expand('<afile>'))
:e ~/.vimrc

The t_IE/t_SI behavior is related to #36 (comment). I'd suggest that the vim-tmux-focus-events folks look at the TermChanged autocmd event, since anything that sets 'term' is going to cause the behavior you're seeing. vim-gnupg just has to set 'term' for convoluted reasons.

from vim-gnupg.

cpixl avatar cpixl commented on May 20, 2024

Hmmmm, tried the suggested steps and it worked without issues... no echoing on the bottom of screen.

Just to make things clear (maybe I didn't understand correctly, but anyway), the &t_IE and &t_SI being unset is not related to the vim-tmux-focus-events plugin, as it happens even when your plugin is the only one on my vimrc.

from vim-gnupg.

jamessan avatar jamessan commented on May 20, 2024

Yes, the t_IE/t_SI issues are because vim-gnupg has the line let &term=&term, for the reasons described in #36 (comment). However, vim-gnupg also emits the TermChanged autocmd event when this happens.

Even without vim-gnupg, if anything changed the value of 'term', then vim-tmux-focus-events would be broken because it isn't listening for TermChanged and setting up t_IE/t_SI again. That vim-gnupg has to set 'term' is a comedy of errors, but that doesn't change the fact that anyone changing 'term' is going to break the tmux plugin.

from vim-gnupg.

cpixl avatar cpixl commented on May 20, 2024

Got it! Well, I was setting t_IE and t_SI on my vimrc manually, so I just au TermChanged * and it works fine now! Thank you!

About the echoing in the bottom of screen, the issue persists... and as you suggested the test with BufReadCmd didn't replicate the behavior. Any idea?

from vim-gnupg.

jamessan avatar jamessan commented on May 20, 2024

Not off-hand. I'll try to find some time to look into that soon.

from vim-gnupg.

bruno- avatar bruno- commented on May 20, 2024

Hi, I started using this plugin - great stuff!

I also get Press ENTER or type command to continue message at the bottom when opening encrypted file. I also use vim-tmux-focus-events plugin.

I investigated the issue and it seems it starts happening with this commit bd3ebdf. I further confirmed this by commenting out this let &term = &term around line 1295 in plugin/gnupg.vim. When this is done, the issue does not happen anymore.

Another way to "fix" the issue to work with vim-tmux-focus-events is by leaving let &term = &term and just having something like this (2 lines below added, they replicate what vim-tmux-focus-events does):

let &term = &term
exec "set <F24>=\<Esc>[O"
exec "set <F25>=\<Esc>[I"

from vim-gnupg.

jamessan avatar jamessan commented on May 20, 2024

@bruno- Or for vim-tmux-focus-events to set any of their term-related settings when the TermChanged autocmd triggers, as I suggested in #38 (comment).

from vim-gnupg.

bruno- avatar bruno- commented on May 20, 2024

Thank you very much sir, that's the right way to handle this!
It's now fixed tmux-plugins/vim-tmux-focus-events@bb36f0c, case closed.

from vim-gnupg.

jamessan avatar jamessan commented on May 20, 2024

Thanks! Now I just need to find time to try and fix the vim + gnupg interaction that required this workaround. :)

from vim-gnupg.

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.