mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #934 from fornwall/remove-FEAT_MOUSE_JSB
Remove FEAT_MOUSE_JSB
This commit is contained in:
commit
4f26b64722
@ -7564,8 +7564,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
rather complex sequence, starting with "<Esc>[".
|
rather complex sequence, starting with "<Esc>[".
|
||||||
This is also available for an Xterm, if it was
|
This is also available for an Xterm, if it was
|
||||||
configured with "--enable-dec-locator".
|
configured with "--enable-dec-locator".
|
||||||
*jsbterm-mouse*
|
|
||||||
jsbterm JSB term mouse handling.
|
|
||||||
*pterm-mouse*
|
*pterm-mouse*
|
||||||
pterm QNX pterm mouse handling.
|
pterm QNX pterm mouse handling.
|
||||||
*urxvt-mouse*
|
*urxvt-mouse*
|
||||||
@ -7581,8 +7579,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
mouse codes.
|
mouse codes.
|
||||||
|
|
||||||
The mouse handling must be enabled at compile time |+mouse_xterm|
|
The mouse handling must be enabled at compile time |+mouse_xterm|
|
||||||
|+mouse_dec| |+mouse_netterm| |+mouse_jsbterm| |+mouse_urxvt|
|
|+mouse_dec| |+mouse_netterm| |+mouse_urxvt| |+mouse_sgr|.
|
||||||
|+mouse_sgr|.
|
|
||||||
Only "xterm"(2) is really recognized. NetTerm mouse codes are always
|
Only "xterm"(2) is really recognized. NetTerm mouse codes are always
|
||||||
recognized, if enabled at compile time. DEC terminal mouse codes
|
recognized, if enabled at compile time. DEC terminal mouse codes
|
||||||
are recognized if enabled at compile time, and 'ttymouse' is not
|
are recognized if enabled at compile time, and 'ttymouse' is not
|
||||||
|
@ -379,7 +379,6 @@ N *+mouse* Mouse handling |mouse-using|
|
|||||||
N *+mouseshape* |'mouseshape'|
|
N *+mouseshape* |'mouseshape'|
|
||||||
B *+mouse_dec* Unix only: Dec terminal mouse handling |dec-mouse|
|
B *+mouse_dec* Unix only: Dec terminal mouse handling |dec-mouse|
|
||||||
N *+mouse_gpm* Unix only: Linux console mouse handling |gpm-mouse|
|
N *+mouse_gpm* Unix only: Linux console mouse handling |gpm-mouse|
|
||||||
N *+mouse_jsbterm* JSB mouse handling |jsbterm-mouse|
|
|
||||||
B *+mouse_netterm* Unix only: netterm mouse handling |netterm-mouse|
|
B *+mouse_netterm* Unix only: netterm mouse handling |netterm-mouse|
|
||||||
N *+mouse_pterm* QNX only: pterm mouse handling |qnx-terminal|
|
N *+mouse_pterm* QNX only: pterm mouse handling |qnx-terminal|
|
||||||
N *+mouse_sysmouse* Unix only: *BSD console mouse handling |sysmouse|
|
N *+mouse_sysmouse* Unix only: *BSD console mouse handling |sysmouse|
|
||||||
|
@ -9709,9 +9709,6 @@ static void f_has(typval_T *argvars, typval_T *rettv)
|
|||||||
"mouse",
|
"mouse",
|
||||||
#if defined(UNIX)
|
#if defined(UNIX)
|
||||||
"mouse_dec",
|
"mouse_dec",
|
||||||
# ifdef FEAT_MOUSE_JSB
|
|
||||||
"mouse_jsbterm",
|
|
||||||
# endif
|
|
||||||
"mouse_netterm",
|
"mouse_netterm",
|
||||||
"mouse_sgr",
|
"mouse_sgr",
|
||||||
"mouse_urxvt",
|
"mouse_urxvt",
|
||||||
|
@ -252,9 +252,6 @@ static struct key_name_entry {
|
|||||||
{K_MOUSE, (char_u *)"Mouse"},
|
{K_MOUSE, (char_u *)"Mouse"},
|
||||||
{K_NETTERM_MOUSE, (char_u *)"NetMouse"},
|
{K_NETTERM_MOUSE, (char_u *)"NetMouse"},
|
||||||
{K_DEC_MOUSE, (char_u *)"DecMouse"},
|
{K_DEC_MOUSE, (char_u *)"DecMouse"},
|
||||||
#ifdef FEAT_MOUSE_JSB
|
|
||||||
{K_JSBTERM_MOUSE, (char_u *)"JsbMouse"},
|
|
||||||
#endif
|
|
||||||
{K_URXVT_MOUSE, (char_u *)"UrxvtMouse"},
|
{K_URXVT_MOUSE, (char_u *)"UrxvtMouse"},
|
||||||
{K_SGR_MOUSE, (char_u *)"SgrMouse"},
|
{K_SGR_MOUSE, (char_u *)"SgrMouse"},
|
||||||
{K_LEFTMOUSE, (char_u *)"LeftMouse"},
|
{K_LEFTMOUSE, (char_u *)"LeftMouse"},
|
||||||
|
@ -94,9 +94,6 @@
|
|||||||
*/
|
*/
|
||||||
#define KS_TEAROFF 244
|
#define KS_TEAROFF 244
|
||||||
|
|
||||||
/* Used for JSB term mouse. */
|
|
||||||
#define KS_JSBTERM_MOUSE 243
|
|
||||||
|
|
||||||
/* Used a termcap entry that produces a normal character. */
|
/* Used a termcap entry that produces a normal character. */
|
||||||
#define KS_KEY 242
|
#define KS_KEY 242
|
||||||
|
|
||||||
@ -415,7 +412,6 @@ enum key_extra {
|
|||||||
|
|
||||||
#define K_NETTERM_MOUSE TERMCAP2KEY(KS_NETTERM_MOUSE, KE_FILLER)
|
#define K_NETTERM_MOUSE TERMCAP2KEY(KS_NETTERM_MOUSE, KE_FILLER)
|
||||||
#define K_DEC_MOUSE TERMCAP2KEY(KS_DEC_MOUSE, KE_FILLER)
|
#define K_DEC_MOUSE TERMCAP2KEY(KS_DEC_MOUSE, KE_FILLER)
|
||||||
#define K_JSBTERM_MOUSE TERMCAP2KEY(KS_JSBTERM_MOUSE, KE_FILLER)
|
|
||||||
#define K_PTERM_MOUSE TERMCAP2KEY(KS_PTERM_MOUSE, KE_FILLER)
|
#define K_PTERM_MOUSE TERMCAP2KEY(KS_PTERM_MOUSE, KE_FILLER)
|
||||||
#define K_URXVT_MOUSE TERMCAP2KEY(KS_URXVT_MOUSE, KE_FILLER)
|
#define K_URXVT_MOUSE TERMCAP2KEY(KS_URXVT_MOUSE, KE_FILLER)
|
||||||
#define K_SGR_MOUSE TERMCAP2KEY(KS_SGR_MOUSE, KE_FILLER)
|
#define K_SGR_MOUSE TERMCAP2KEY(KS_SGR_MOUSE, KE_FILLER)
|
||||||
|
@ -572,16 +572,15 @@ EXTERN char_u *p_ttym; /* 'ttymouse' */
|
|||||||
EXTERN unsigned ttym_flags;
|
EXTERN unsigned ttym_flags;
|
||||||
# ifdef IN_OPTION_C
|
# ifdef IN_OPTION_C
|
||||||
static char *(p_ttym_values[]) =
|
static char *(p_ttym_values[]) =
|
||||||
{"xterm", "xterm2", "dec", "netterm", "jsbterm", "pterm", "urxvt", "sgr", NULL};
|
{"xterm", "xterm2", "dec", "netterm", "pterm", "urxvt", "sgr", NULL};
|
||||||
# endif
|
# endif
|
||||||
# define TTYM_XTERM 0x01
|
# define TTYM_XTERM 0x01
|
||||||
# define TTYM_XTERM2 0x02
|
# define TTYM_XTERM2 0x02
|
||||||
# define TTYM_DEC 0x04
|
# define TTYM_DEC 0x04
|
||||||
# define TTYM_NETTERM 0x08
|
# define TTYM_NETTERM 0x08
|
||||||
# define TTYM_JSBTERM 0x10
|
# define TTYM_PTERM 0x10
|
||||||
# define TTYM_PTERM 0x20
|
# define TTYM_URXVT 0x20
|
||||||
# define TTYM_URXVT 0x40
|
# define TTYM_SGR 0x40
|
||||||
# define TTYM_SGR 0x80
|
|
||||||
#endif
|
#endif
|
||||||
EXTERN char_u *p_udir; /* 'undodir' */
|
EXTERN char_u *p_udir; /* 'undodir' */
|
||||||
EXTERN long p_ul; /* 'undolevels' */
|
EXTERN long p_ul; /* 'undolevels' */
|
||||||
|
136
src/nvim/term.c
136
src/nvim/term.c
@ -1636,10 +1636,9 @@ int set_termname(char_u *term)
|
|||||||
# define HMT_NORMAL 1
|
# define HMT_NORMAL 1
|
||||||
# define HMT_NETTERM 2
|
# define HMT_NETTERM 2
|
||||||
# define HMT_DEC 4
|
# define HMT_DEC 4
|
||||||
# define HMT_JSBTERM 8
|
# define HMT_PTERM 8
|
||||||
# define HMT_PTERM 16
|
# define HMT_URXVT 16
|
||||||
# define HMT_URXVT 32
|
# define HMT_SGR 32
|
||||||
# define HMT_SGR 64
|
|
||||||
static int has_mouse_termcode = 0;
|
static int has_mouse_termcode = 0;
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1653,11 +1652,6 @@ set_mouse_termcode (
|
|||||||
name[0] = n;
|
name[0] = n;
|
||||||
name[1] = KE_FILLER;
|
name[1] = KE_FILLER;
|
||||||
add_termcode(name, s, FALSE);
|
add_termcode(name, s, FALSE);
|
||||||
# ifdef FEAT_MOUSE_JSB
|
|
||||||
if (n == KS_JSBTERM_MOUSE)
|
|
||||||
has_mouse_termcode |= HMT_JSBTERM;
|
|
||||||
else
|
|
||||||
# endif
|
|
||||||
if (n == KS_NETTERM_MOUSE)
|
if (n == KS_NETTERM_MOUSE)
|
||||||
has_mouse_termcode |= HMT_NETTERM;
|
has_mouse_termcode |= HMT_NETTERM;
|
||||||
else if (n == KS_DEC_MOUSE)
|
else if (n == KS_DEC_MOUSE)
|
||||||
@ -1681,11 +1675,6 @@ del_mouse_termcode (
|
|||||||
name[0] = n;
|
name[0] = n;
|
||||||
name[1] = KE_FILLER;
|
name[1] = KE_FILLER;
|
||||||
del_termcode(name);
|
del_termcode(name);
|
||||||
# ifdef FEAT_MOUSE_JSB
|
|
||||||
if (n == KS_JSBTERM_MOUSE)
|
|
||||||
has_mouse_termcode &= ~HMT_JSBTERM;
|
|
||||||
else
|
|
||||||
# endif
|
|
||||||
if (n == KS_NETTERM_MOUSE)
|
if (n == KS_NETTERM_MOUSE)
|
||||||
has_mouse_termcode &= ~HMT_NETTERM;
|
has_mouse_termcode &= ~HMT_NETTERM;
|
||||||
else if (n == KS_DEC_MOUSE)
|
else if (n == KS_DEC_MOUSE)
|
||||||
@ -3498,9 +3487,6 @@ int check_termcode(int max_offset, char_u *buf, int bufsize, int *buflen)
|
|||||||
* If it is a mouse click, get the coordinates.
|
* If it is a mouse click, get the coordinates.
|
||||||
*/
|
*/
|
||||||
if (key_name[0] == KS_MOUSE
|
if (key_name[0] == KS_MOUSE
|
||||||
# ifdef FEAT_MOUSE_JSB
|
|
||||||
|| key_name[0] == KS_JSBTERM_MOUSE
|
|
||||||
# endif
|
|
||||||
|| key_name[0] == KS_NETTERM_MOUSE
|
|| key_name[0] == KS_NETTERM_MOUSE
|
||||||
|| key_name[0] == KS_DEC_MOUSE
|
|| key_name[0] == KS_DEC_MOUSE
|
||||||
|| key_name[0] == KS_URXVT_MOUSE
|
|| key_name[0] == KS_URXVT_MOUSE
|
||||||
@ -3682,122 +3668,6 @@ int check_termcode(int max_offset, char_u *buf, int bufsize, int *buflen)
|
|||||||
mouse_code = MOUSE_LEFT;
|
mouse_code = MOUSE_LEFT;
|
||||||
slen += (int)(p - (tp + slen));
|
slen += (int)(p - (tp + slen));
|
||||||
}
|
}
|
||||||
# ifdef FEAT_MOUSE_JSB
|
|
||||||
if (key_name[0] == (int)KS_JSBTERM_MOUSE) {
|
|
||||||
int mult, val, iter, button, status;
|
|
||||||
|
|
||||||
/* JSBTERM Input Model
|
|
||||||
* \033[0~zw uniq escape sequence
|
|
||||||
* (L-x) Left button pressed - not pressed x not reporting
|
|
||||||
* (M-x) Middle button pressed - not pressed x not reporting
|
|
||||||
* (R-x) Right button pressed - not pressed x not reporting
|
|
||||||
* (SDmdu) Single , Double click, m mouse move d button down
|
|
||||||
* u button up
|
|
||||||
* ### X cursor position padded to 3 digits
|
|
||||||
* ### Y cursor position padded to 3 digits
|
|
||||||
* (s-x) SHIFT key pressed - not pressed x not reporting
|
|
||||||
* (c-x) CTRL key pressed - not pressed x not reporting
|
|
||||||
* \033\\ terminating sequence
|
|
||||||
*/
|
|
||||||
|
|
||||||
p = tp + slen;
|
|
||||||
button = mouse_code = 0;
|
|
||||||
switch (*p++) {
|
|
||||||
case 'L': button = 1; break;
|
|
||||||
case '-': break;
|
|
||||||
case 'x': break; /* ignore sequence */
|
|
||||||
default: return -1; /* Unknown Result */
|
|
||||||
}
|
|
||||||
switch (*p++) {
|
|
||||||
case 'M': button |= 2; break;
|
|
||||||
case '-': break;
|
|
||||||
case 'x': break; /* ignore sequence */
|
|
||||||
default: return -1; /* Unknown Result */
|
|
||||||
}
|
|
||||||
switch (*p++) {
|
|
||||||
case 'R': button |= 4; break;
|
|
||||||
case '-': break;
|
|
||||||
case 'x': break; /* ignore sequence */
|
|
||||||
default: return -1; /* Unknown Result */
|
|
||||||
}
|
|
||||||
status = *p++;
|
|
||||||
for (val = 0, mult = 100, iter = 0; iter < 3; iter++,
|
|
||||||
mult /= 10, p++)
|
|
||||||
if (*p >= '0' && *p <= '9')
|
|
||||||
val += (*p - '0') * mult;
|
|
||||||
else
|
|
||||||
return -1;
|
|
||||||
mouse_col = val;
|
|
||||||
for (val = 0, mult = 100, iter = 0; iter < 3; iter++,
|
|
||||||
mult /= 10, p++)
|
|
||||||
if (*p >= '0' && *p <= '9')
|
|
||||||
val += (*p - '0') * mult;
|
|
||||||
else
|
|
||||||
return -1;
|
|
||||||
mouse_row = val;
|
|
||||||
switch (*p++) {
|
|
||||||
case 's': button |= 8; break; /* SHIFT key Pressed */
|
|
||||||
case '-': break; /* Not Pressed */
|
|
||||||
case 'x': break; /* Not Reporting */
|
|
||||||
default: return -1; /* Unknown Result */
|
|
||||||
}
|
|
||||||
switch (*p++) {
|
|
||||||
case 'c': button |= 16; break; /* CTRL key Pressed */
|
|
||||||
case '-': break; /* Not Pressed */
|
|
||||||
case 'x': break; /* Not Reporting */
|
|
||||||
default: return -1; /* Unknown Result */
|
|
||||||
}
|
|
||||||
if (*p++ != '\033')
|
|
||||||
return -1;
|
|
||||||
if (*p++ != '\\')
|
|
||||||
return -1;
|
|
||||||
switch (status) {
|
|
||||||
case 'D': /* Double Click */
|
|
||||||
case 'S': /* Single Click */
|
|
||||||
if (button & 1) mouse_code |= MOUSE_LEFT;
|
|
||||||
if (button & 2) mouse_code |= MOUSE_MIDDLE;
|
|
||||||
if (button & 4) mouse_code |= MOUSE_RIGHT;
|
|
||||||
if (button & 8) mouse_code |= MOUSE_SHIFT;
|
|
||||||
if (button & 16) mouse_code |= MOUSE_CTRL;
|
|
||||||
break;
|
|
||||||
case 'm': /* Mouse move */
|
|
||||||
if (button & 1) mouse_code |= MOUSE_LEFT;
|
|
||||||
if (button & 2) mouse_code |= MOUSE_MIDDLE;
|
|
||||||
if (button & 4) mouse_code |= MOUSE_RIGHT;
|
|
||||||
if (button & 8) mouse_code |= MOUSE_SHIFT;
|
|
||||||
if (button & 16) mouse_code |= MOUSE_CTRL;
|
|
||||||
if ((button & 7) != 0) {
|
|
||||||
held_button = mouse_code;
|
|
||||||
mouse_code |= MOUSE_DRAG;
|
|
||||||
}
|
|
||||||
is_drag = TRUE;
|
|
||||||
showmode();
|
|
||||||
break;
|
|
||||||
case 'd': /* Button Down */
|
|
||||||
if (button & 1) mouse_code |= MOUSE_LEFT;
|
|
||||||
if (button & 2) mouse_code |= MOUSE_MIDDLE;
|
|
||||||
if (button & 4) mouse_code |= MOUSE_RIGHT;
|
|
||||||
if (button & 8) mouse_code |= MOUSE_SHIFT;
|
|
||||||
if (button & 16) mouse_code |= MOUSE_CTRL;
|
|
||||||
break;
|
|
||||||
case 'u': /* Button Up */
|
|
||||||
if (button & 1)
|
|
||||||
mouse_code |= MOUSE_LEFT | MOUSE_RELEASE;
|
|
||||||
if (button & 2)
|
|
||||||
mouse_code |= MOUSE_MIDDLE | MOUSE_RELEASE;
|
|
||||||
if (button & 4)
|
|
||||||
mouse_code |= MOUSE_RIGHT | MOUSE_RELEASE;
|
|
||||||
if (button & 8)
|
|
||||||
mouse_code |= MOUSE_SHIFT;
|
|
||||||
if (button & 16)
|
|
||||||
mouse_code |= MOUSE_CTRL;
|
|
||||||
break;
|
|
||||||
default: return -1; /* Unknown Result */
|
|
||||||
}
|
|
||||||
|
|
||||||
slen += (p - (tp + slen));
|
|
||||||
}
|
|
||||||
# endif /* FEAT_MOUSE_JSB */
|
|
||||||
if (key_name[0] == (int)KS_DEC_MOUSE) {
|
if (key_name[0] == (int)KS_DEC_MOUSE) {
|
||||||
/* The DEC Locator Input Model
|
/* The DEC Locator Input Model
|
||||||
* Netterm delivers the code sequence:
|
* Netterm delivers the code sequence:
|
||||||
|
@ -116,11 +116,6 @@ static char *(features[]) = {
|
|||||||
#if defined(UNIX)
|
#if defined(UNIX)
|
||||||
"+mouse_dec",
|
"+mouse_dec",
|
||||||
"-mouse_gpm",
|
"-mouse_gpm",
|
||||||
# ifdef FEAT_MOUSE_JSB
|
|
||||||
"+mouse_jsbterm",
|
|
||||||
# else // ifdef FEAT_MOUSE_JSB
|
|
||||||
"-mouse_jsbterm",
|
|
||||||
# endif // ifdef FEAT_MOUSE_JSB
|
|
||||||
"+mouse_netterm",
|
"+mouse_netterm",
|
||||||
#endif // if defined(UNIX)
|
#endif // if defined(UNIX)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user