Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法正常关闭窗口 #25

Closed
whxcode opened this issue Aug 9, 2022 · 12 comments
Closed

无法正常关闭窗口 #25

whxcode opened this issue Aug 9, 2022 · 12 comments

Comments

@whxcode
Copy link

whxcode commented Aug 9, 2022

我在使用过程中发现了一个小问题,打开窗口;使用以下快捷键
let g:peekup_paste_before = 'q'
let g:peekup_paste_after = 'p'
选择了对应了寄存器之后,在光标的前/后插入了文本之后;窗口没能自动关闭,且按 esc 键,也无法关闭。
image
如图,光标已经聚焦到编辑器内部了。

@gennaro-tedesco
Copy link
Owner

gennaro-tedesco commented Aug 9, 2022

Good afternoon and thank you for looking into nvim-peekup: I would ask you to edit the text in English characters (I suppose you have your keyboard set to something else and did not realise), otherwise I cannot read it :)

@whxcode
Copy link
Author

whxcode commented Aug 9, 2022

Good afternoon and thank you for looking into nvim-peekup: I would ask you to edit the text in English characters (I suppose you have your keyboard set to something else and did not realise), otherwise I cannot read it :)

Sorry, my English is not good. Thank you for your answer.

@gennaro-tedesco
Copy link
Owner

Trying to use google translate on your text it seems you are seeing problems in closing the window after pressing ESC: this happens because the focussed window is no longer the peekup window in your example (most likely you moved the cursor elsewhere, on another window of the editor). The ESC key-binding only works when the focus in on peekup: so switch the focus/cursor back on the peekup window and it will close :).

@whxcode
Copy link
Author

whxcode commented Aug 9, 2022

Trying to use google translate on your text it seems you are seeing problems in closing the window after pressing ESC: this happens because the focussed window is no longer the peekup window in your example (most likely you moved the cursor elsewhere, on another window of the editor). The ESC key-binding only works when the focus in on peekup: so switch the focus/cursor back on the peekup window and it will close :).

Yes, because after pasting, the 'peekup' window has lost focus, but I don't know how to switch the focus to the 'peekup' window.

@whxcode
Copy link
Author

whxcode commented Aug 9, 2022

Trying to use google translate on your text it seems you are seeing problems in closing the window after pressing ESC: this happens because the focussed window is no longer the peekup window in your example (most likely you moved the cursor elsewhere, on another window of the editor). The ESC key-binding only works when the focus in on peekup: so switch the focus/cursor back on the peekup window and it will close :).

This is my configuration for 'peekup'
image

@gennaro-tedesco
Copy link
Owner

but I don't know how to switch the focus to the 'peekup' window.

you can just cycle through all your open windows with <C-w>w/W

@whxcode
Copy link
Author

whxcode commented Aug 10, 2022

but I don't know how to switch the focus to the 'peekup' window.

you can just cycle through all your open windows with <C-w>w/W

Good evening, I have tried to use the w/W keys yesterday; switch windows, but still can't switch back to the peekup window.
I am using nvim v0.8.0-dev version.
thanks for your reply.

@gennaro-tedesco
Copy link
Owner

Can you not cycle through windows at all or can you indeed, and the peekup window is never selected? Could you try just clicking on the window with the mouse instead (just to ensure that the focus is there)?

@whxcode
Copy link
Author

whxcode commented Aug 10, 2022

Can you not cycle through windows at all or can you indeed, and the peekup window is never selected? Could you try just clicking on the window with the mouse instead (just to ensure that the focus is there)?

I've tried many ways, but I can't get the focus back inside the peekup .

@gennaro-tedesco
Copy link
Owner

In the video below you can see that whenever the focus is indeed on the peekup window, it closes fine. In order to cycle it back and forth I am using the mouse click (for demonstration, but <C-w>w would do too)

Screen.Recording.2022-08-10.at.11.01.26.mov

I've tried many ways, but I can't get the focus back inside the peekup .

this seems however not to be a problem of the plugin per sé, rather of how your neovim instance cycles through the open windows. Could you try to reproduce the demo I showed on your computer? Namely what happens when you do click back on peekup?

@whxcode
Copy link
Author

whxcode commented Aug 10, 2022

In the video below you can see that whenever the focus is indeed on the peekup window, it closes fine. In order to cycle it back and forth I am using the mouse click (for demonstration, but <C-w>w would do too)

Screen.Recording.2022-08-10.at.11.01.26.mov

I've tried many ways, but I can't get the focus back inside the peekup .

this seems however not to be a problem of the plugin per sé, rather of how your neovim instance cycles through the open windows. Could you try to reproduce the demo I showed on your computer? Namely what happens when you do click back on peekup?

Sorry, it took so long to reply to you, I just tested it on my own laptop at home, after pasting the content, I can focus on 'peekup' again through C-w/w, the laptop in the company may be caused by other reasons, I will tomorrow Double check, thanks for your help.

@whxcode
Copy link
Author

whxcode commented Aug 10, 2022

In the video below you can see that whenever the focus is indeed on the peekup window, it closes fine. In order to cycle it back and forth I am using the mouse click (for demonstration, but <C-w>w would do too)

Screen.Recording.2022-08-10.at.11.01.26.mov

I've tried many ways, but I can't get the focus back inside the peekup .

this seems however not to be a problem of the plugin per sé, rather of how your neovim instance cycles through the open windows. Could you try to reproduce the demo I showed on your computer? Namely what happens when you do click back on peekup?

gut nacht.

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

No branches or pull requests

2 participants