comparison src/term.c @ 23632:8da1d91d751c v8.2.2358

patch 8.2.2358: wrong #ifdef for use_xterm_like_mouse() Commit: https://github.com/vim/vim/commit/bf78974ca4a6798db7172c226cbfe7b2485b7baa Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 16 11:21:40 2021 +0100 patch 8.2.2358: wrong #ifdef for use_xterm_like_mouse() Problem: Wrong #ifdef for use_xterm_like_mouse(). Solution: Use FEAT_MOUSE_XTERM.
author Bram Moolenaar <Bram@vim.org>
date Sat, 16 Jan 2021 11:30:05 +0100
parents 24beca855c59
children b7d3c79075c5
comparison
equal deleted inserted replaced
23631:552142f8e219 23632:8da1d91d751c
2051 } 2051 }
2052 #else 2052 #else
2053 set_mouse_termcode(KS_MOUSE, (char_u *)"\233M"); 2053 set_mouse_termcode(KS_MOUSE, (char_u *)"\233M");
2054 #endif 2054 #endif
2055 2055
2056 #if (defined(UNIX) || defined(VMS)) 2056 #ifdef FEAT_MOUSE_XTERM
2057 // focus reporting is supported by xterm compatible terminals and tmux. 2057 // focus reporting is supported by xterm compatible terminals and tmux.
2058 if (use_xterm_like_mouse(term)) 2058 if (use_xterm_like_mouse(term))
2059 { 2059 {
2060 char_u name[3]; 2060 char_u name[3];
2061 name[0] = (int)KS_EXTRA; 2061
2062 // handle focus in event
2063 name[0] = KS_EXTRA;
2064 name[1] = KE_FOCUSGAINED;
2062 name[2] = NUL; 2065 name[2] = NUL;
2063
2064 // handle focus in event
2065 name[1] = (int)KE_FOCUSGAINED;
2066 add_termcode(name, (char_u *)"\033[I", FALSE); 2066 add_termcode(name, (char_u *)"\033[I", FALSE);
2067 2067
2068 // handle focus out event 2068 // handle focus out event
2069 name[1] = (int)KE_FOCUSLOST; 2069 name[1] = KE_FOCUSLOST;
2070 add_termcode(name, (char_u *)"\033[O", FALSE); 2070 add_termcode(name, (char_u *)"\033[O", FALSE);
2071 2071
2072 focus_mode = TRUE; 2072 focus_mode = TRUE;
2073 focus_state = TRUE; 2073 focus_state = TRUE;
2074 } 2074 }