loss of mouse focus terminates vim input mode, new misfeatures?
by clsgis from LinuxQuestions.org on (#5S7BE)
I've been using the old-school xterm terminal emulator on KDE for many years. I like the X Window System copy and paste semantics (drag, move, middle click) better than the modern control-C control-V semantics. I use focus follows mouse with no auto-raise, so I can paste into a window that's mostly hidden.
My current desktop is KDE on Debian 10 Buster. Soon to upgrade to Debian 11 Bullseye. I SSH out to other machines, mostly Bullseye and CentOS 7.
This setup hasn't changed much since the 1990s. With Debian 11, there are two new behaviors. Maybe they're new features, but I haven't been able to find their announcements.
1. With vim in input mode in a Bullseye shell in an xterm, when I move the mouse out of the xterm and it loses focus, there's a beep and vim switches from input to edit. (That's new. For twenty years vim has waited quietly for the mouse to come back and paste something.) As if the window system sent a "you just lost focus" signal to vim, and vim thought it was an escape. This new behavior breaks the common maneuver of grabbing some text out of another window and pasting it into the vim buffer.
2. pasting into a shell prompt leaves the text highlighted in the command line, and the output of the resulting command is delayed. This new behavior breaks the common maneuver of pasting a command into a shell in one click.
These are probably new default behaviors, but I don't know where to look to turn them off. Any help?
On bullseye: # vim --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Mar 02 2021 02:58:09)
Included patches: 1-2434
Modified by team+vim@tracker.debian.org
Compiled by team+vim@tracker.debian.org
Huge version without GUI. Features included (+) or not (-):
+acl -farsi +mouse_sgr +tag_binary
+arabic +file_in_path -mouse_sysmouse -tag_old_static
+autocmd +find_in_path +mouse_urxvt -tag_any_white
+autochdir +float +mouse_xterm -tcl
-autoservername +folding +multi_byte +termguicolors
-balloon_eval -footer +multi_lang +terminal
+balloon_eval_term +fork() -mzscheme +terminfo
-browse +gettext +netbeans_intg +termresponse
++builtin_terms -hangul_input +num64 +textobjects
+byte_offset +iconv +packages +textprop
+channel +insert_expand +path_extra +timers
+cindent +ipv6 -perl +title
-clientserver +job +persistent_undo -toolbar
-clipboard +jumplist +popupwin +user_commands
+cmdline_compl +keymap +postscript +vartabs
+cmdline_hist +lambda +printer +vertsplit
+cmdline_info +langmap +profile +virtualedit
+comments +libcall -python +visual
+conceal +linebreak -python3 +visualextra
+cryptv +lispindent +quickfix +viminfo
+cscope +listcmds +reltime +vreplace
+cursorbind +localmap +rightleft +wildignore
+cursorshape -lua -ruby +wildmenu
+dialog_con +menu +scrollbind +windows
+diff +mksession +signs +writebackup
+digraphs +modify_fname +smartindent -X11
-dnd +mouse -sound -xfontset
-ebcdic -mouseshape +spell -xim
+emacs_tags +mouse_dec +startuptime -xpm
+eval +mouse_gpm +statusline -xsmp
+ex_extra -mouse_jsbterm -sun_workshop -xterm_clipboard
+extra_search +mouse_netterm +syntax -xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Wdate-time -g -O2 -ffile-prefix-map=/build/vim-kmJmzI/vim-8.2.2434=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lm -ltinfo -lselinux -lacl -lattr -lgpm -ldl
My current desktop is KDE on Debian 10 Buster. Soon to upgrade to Debian 11 Bullseye. I SSH out to other machines, mostly Bullseye and CentOS 7.
This setup hasn't changed much since the 1990s. With Debian 11, there are two new behaviors. Maybe they're new features, but I haven't been able to find their announcements.
1. With vim in input mode in a Bullseye shell in an xterm, when I move the mouse out of the xterm and it loses focus, there's a beep and vim switches from input to edit. (That's new. For twenty years vim has waited quietly for the mouse to come back and paste something.) As if the window system sent a "you just lost focus" signal to vim, and vim thought it was an escape. This new behavior breaks the common maneuver of grabbing some text out of another window and pasting it into the vim buffer.
2. pasting into a shell prompt leaves the text highlighted in the command line, and the output of the resulting command is delayed. This new behavior breaks the common maneuver of pasting a command into a shell in one click.
These are probably new default behaviors, but I don't know where to look to turn them off. Any help?
On bullseye: # vim --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Mar 02 2021 02:58:09)
Included patches: 1-2434
Modified by team+vim@tracker.debian.org
Compiled by team+vim@tracker.debian.org
Huge version without GUI. Features included (+) or not (-):
+acl -farsi +mouse_sgr +tag_binary
+arabic +file_in_path -mouse_sysmouse -tag_old_static
+autocmd +find_in_path +mouse_urxvt -tag_any_white
+autochdir +float +mouse_xterm -tcl
-autoservername +folding +multi_byte +termguicolors
-balloon_eval -footer +multi_lang +terminal
+balloon_eval_term +fork() -mzscheme +terminfo
-browse +gettext +netbeans_intg +termresponse
++builtin_terms -hangul_input +num64 +textobjects
+byte_offset +iconv +packages +textprop
+channel +insert_expand +path_extra +timers
+cindent +ipv6 -perl +title
-clientserver +job +persistent_undo -toolbar
-clipboard +jumplist +popupwin +user_commands
+cmdline_compl +keymap +postscript +vartabs
+cmdline_hist +lambda +printer +vertsplit
+cmdline_info +langmap +profile +virtualedit
+comments +libcall -python +visual
+conceal +linebreak -python3 +visualextra
+cryptv +lispindent +quickfix +viminfo
+cscope +listcmds +reltime +vreplace
+cursorbind +localmap +rightleft +wildignore
+cursorshape -lua -ruby +wildmenu
+dialog_con +menu +scrollbind +windows
+diff +mksession +signs +writebackup
+digraphs +modify_fname +smartindent -X11
-dnd +mouse -sound -xfontset
-ebcdic -mouseshape +spell -xim
+emacs_tags +mouse_dec +startuptime -xpm
+eval +mouse_gpm +statusline -xsmp
+ex_extra -mouse_jsbterm -sun_workshop -xterm_clipboard
+extra_search +mouse_netterm +syntax -xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Wdate-time -g -O2 -ffile-prefix-map=/build/vim-kmJmzI/vim-8.2.2434=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lm -ltinfo -lselinux -lacl -lattr -lgpm -ldl