right button of mouse or `print screen` will close the error windows. #3969

Closed
wsdjeg opened this Issue Jan 9, 2016 · 28 comments

Comments

Projects
None yet
3 participants
Contributor

wsdjeg commented Jan 9, 2016

My os is ubuntu ,I start nvm by nvim -u NONE

then echo g:test
will show me error message ,I want use mouse selete the message ,and type right button open the menu,then copy the message,it works well in vim .but in neovim if I type right button of the mouse ,the error windows will be closed!
here is some pic for this issue
in vim
2016-01-09 15-49-54
then I have select this message ,I can type right button of mouse to copy this message ,or can use print screen to make pic like above,
but in nvim if i type right button or print screen the message will gone only can catch this picture
2016-01-09 15-53-01

I think it is due to how to delimit the other command
because the below the error mesage shows press Enter or type command to continue

sorry for my pool english,I hope any one can understand

Owner

justinmk commented Jan 9, 2016

We have a bunch of issues which all are attributable to (probably) the same root cause. Tossing this in with #3168

@justinmk justinmk closed this Jan 9, 2016

Contributor

wsdjeg commented Jan 9, 2016

@justinmk sorry ,I am not typping into any char, are you sure it is the same issue?

Owner

justinmk commented Jan 9, 2016

Mouse actions are sent as char sequences

Contributor

wsdjeg commented Jan 9, 2016

you see in vim ,I can open the menu of the terminal ,can open the search windows of terminal,but in neovim ,the popup menu will be closed

vim

2016-01-10 01-43-23

neovim

2016-01-10 01-44-17

Contributor

wsdjeg commented Jan 9, 2016

@justinmk also type Alt get the same issue,the completion will be done,just like type esc

Owner

justinmk commented Jan 9, 2016

Again, this is most likely the same root cause (maybe related to setting the high bit). See also #3094

Contributor

wsdjeg commented Jan 9, 2016

yes ,everything look like the same ,also Alt+tab get the same issue

Contributor

ZyX-I commented Jan 9, 2016

I cannot reproduce this in konsole (yakuake), v0.1.2-190-g50db031.

Contributor

wsdjeg commented Jan 10, 2016

@ZyX-I you means you use different terminal with me ? can you try with gnome-terminal please?

Contributor

ZyX-I commented Jan 10, 2016

@wsdjeg Yes. I would also check whether you can reproduce this in Vim, but before trying set mouse=a (just as well it is not reproducible here on my machine).

Contributor

wsdjeg commented Jan 10, 2016

@ZyX-I in gnomer-terminal I hava test vim ,by default ,it do not set mouse=a,and everything works well,vim will reproduce this by set mouse=a,and neovim reproduce this in gnome-terminal both set mouse=a or not.
and do you know any one who use ubuntu os,

Owner

justinmk commented Jan 10, 2016

I really think we should revert the mouse=a default.

Contributor

ZyX-I commented Jan 10, 2016

@wsdjeg For Neovim you should check with set mouse= and nothing because set mouse=a is the default and checking with nothing or set mouse=a is meaningless.

@ZyX-I ZyX-I added bug-vim and removed duplicate labels Jan 10, 2016

Contributor

ZyX-I commented Jan 10, 2016

@justinmk I would rather say that TUI should ignore mouse clicks (drags, whatever) done on messages area, statuslines and tab line (latter should be ignored only if tabline does not do mouse clicks processing in the clicked area). Given the behaviour of Vim in konsole I observe I actually thought that this was already done.

@ZyX-I ZyX-I reopened this Jan 10, 2016

Contributor

wsdjeg commented Jan 10, 2016

thanks for reopen this issue,I hope I can show you all the repoduce way,but now I only find these;

all these behavior will close message area,and close popupmenu

  • mouse clicks on message area
  • open menu of terminal
  • press print screen
  • type Alt
  • type Shilf + Ctrl + f, it is hot key of terminal
  • type Alt+tab to switch to other program
  • open test.js with neovim ,set mouse= ,then type into windows. ,use Ctrl+x Ctrl+o open the popupmenu,then if I type left button mouse ,the popupmenu will not be closed,but If I type right button to open the menu of terminal,the popupmenu will be closed. this is different with vim .

one month ago, I can use print screen to catch my creem ,and the popupmenu will not be closed ,you see here is the picture I got Link

2015-12-09 21-47-33

and if I found new way,I will update this message,thanks a lot

Contributor

wsdjeg commented Jan 10, 2016

@justinmk @ZyX-I set mouse=a as default I think it is good idea,there is no need to change same as vim ,but even if set mouse=a in vim ,I also get some defferent behavior in neovim .

Contributor

ZyX-I commented Jan 10, 2016

Typing alt is a different thing, I do not know why it triggers the thing, but if alt switches to terminal menu then it is probably FocusLost, same for <A-tab>.

By the way, can you define

autocmd FocusLost * :let g:cnt=get(g:, 'cnt', 0) + 1 | echomsg 'FocusLost' g:cnt

and repeat all of the checks (check :messages before reporting in case you have missed something)?

Also I have no idea what is <C-S-f> supposed to do, not all people have your terminal.

@wsdjeg wsdjeg referenced this issue in Shougo/neocomplete.vim Jan 10, 2016

Closed

How could I source tags like deoplete in java file? #511

Contributor

wsdjeg commented Jan 10, 2016

ok I will do it, has add autocmd FocusLost * :let g:cnt=get(g:, 'cnt', 0) + 1 | echomsg 'FocusLost' g:cntinto vimrc

  1. nvim test.js
  2. type into windows.
  3. type Ctrl+x Ctrl+y
  4. type Alt+tab
  5. :mes

I can not use right button of mouse copy the message,so i take a photograph

aa

Contributor

wsdjeg commented Jan 10, 2016

I think maybe it is the problem with my terminal

Contributor

ZyX-I commented Jan 10, 2016

@wsdjeg Do not use right button, there is :redir @+ | messages | redir END.

Your report was regarding <A-Tab>, <PrintScreen>, <A->, <C-S-f> and opening terminal right click menu, why did you check only <A-Tab>? Also you do not need to open popup menu, this does not change when FocusLost event is sent by terminal emulator. Actually you have wasted a lot of time on checking that FocusLost is received when popup menu is active when you press <A-Tab> which is useless because FocusLost event is not and should not be prevented by popup menu presence (though it is subjectable whether it should close popup menu or not) and <A-Tab> is the only expected way to invoke this event among listed.

Contributor

ZyX-I commented Jan 10, 2016

(Also you need to report first two errors you see to vim-javascript maintainers in case you did not already do it.)

Contributor

wsdjeg commented Jan 10, 2016

ok I think I should show you some pictures,
first I open two terminals, one in on the right and the other is on the left
then ,I open a java file ,and open popupmenu,like below
2016-01-10 12-04-43
then I can use Alt +tab switch between these two terminals, and the popupmenu will not be closed.
2016-01-10 12-04-40
also the error message area will not be closed,you see I am now in the left terminal and the right terminal's message area will not be closed
2016-01-10 12-10-48

but in neovim ,the popupmenu will be closed ,when I type Alt+tab ,also the message area will be closed too

Contributor

ZyX-I commented Jan 10, 2016

@wsdjeg Vim does not support FocusLost events in terminal AFAIK (even though there is a patch for this). If you need to compare the behaviour with Vim, compare it with GUI Vim (though I should say I do not see messages closed by loosing focus with gtk Vim GUI).

Also I did not ask about <A-Tab>, there are other things you reported to close messages and popup which may be not a result of FocusLost. And the question was whether FocusLost may be responsible for closing popups at right click menu, printscreen or other your actions you reported to close it.

_SO STOP TALKING ABOUT <A-TAB>._

Cause for the closing in case of <A-Tab> was already suggested and last your comment has absolutely no value. If other ways to close popup window you reported run FocusLost then there are good chances that there is only one error, connected to FocusLost (i.e. to processing escape sequences terminal sends in this case).

Owner

justinmk commented Jan 10, 2016

messages closed by loosing focus

Sounds like #3416. Closing as dup.

@justinmk justinmk closed this Jan 10, 2016

@justinmk justinmk added the duplicate label Jan 10, 2016

Contributor

ZyX-I commented Jan 10, 2016

@justinmk Yeah, #3416 is more likely to be the same issues then #3094.

Contributor

wsdjeg commented Jan 10, 2016

@ZyX-I @justinmk Hi I do not know why everything works well now,I just update my system,everything works well ,and I can type alt print screen
you see
2016-01-10 20-09-55
and if I set mouse= everything works better because mouse movement will close popupmenu,I am using Touch Pad

Contributor

wsdjeg commented Jan 10, 2016

this pic is for open java file type into this. the popupmenu auto open ,then move mouse by touch pad
2016-01-10 20-14-46

Contributor

wsdjeg commented Jan 11, 2016

this issue appear again,really do not know why!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment