Merge pull request #934 from fornwall/remove-FEAT_MOUSE_JSB

Remove FEAT_MOUSE_JSB
This commit is contained in:
Justin M. Keyes 2014-07-29 14:09:58 -04:00
commit 4f26b64722
8 changed files with 8 additions and 158 deletions

View File

@ -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>[".
This is also available for an Xterm, if it was
configured with "--enable-dec-locator".
*jsbterm-mouse*
jsbterm JSB term mouse handling.
*pterm-mouse*
pterm QNX pterm mouse handling.
*urxvt-mouse*
@ -7581,8 +7579,7 @@ A jump table for the options with a short description can be found at |Q_op|.
mouse codes.
The mouse handling must be enabled at compile time |+mouse_xterm|
|+mouse_dec| |+mouse_netterm| |+mouse_jsbterm| |+mouse_urxvt|
|+mouse_sgr|.
|+mouse_dec| |+mouse_netterm| |+mouse_urxvt| |+mouse_sgr|.
Only "xterm"(2) is really recognized. NetTerm mouse codes are always
recognized, if enabled at compile time. DEC terminal mouse codes
are recognized if enabled at compile time, and 'ttymouse' is not

View File

@ -379,7 +379,6 @@ N *+mouse* Mouse handling |mouse-using|
N *+mouseshape* |'mouseshape'|
B *+mouse_dec* Unix only: Dec terminal mouse handling |dec-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|
N *+mouse_pterm* QNX only: pterm mouse handling |qnx-terminal|
N *+mouse_sysmouse* Unix only: *BSD console mouse handling |sysmouse|

View File

@ -9709,9 +9709,6 @@ static void f_has(typval_T *argvars, typval_T *rettv)
"mouse",
#if defined(UNIX)
"mouse_dec",
# ifdef FEAT_MOUSE_JSB
"mouse_jsbterm",
# endif
"mouse_netterm",
"mouse_sgr",
"mouse_urxvt",

View File

@ -252,9 +252,6 @@ static struct key_name_entry {
{K_MOUSE, (char_u *)"Mouse"},
{K_NETTERM_MOUSE, (char_u *)"NetMouse"},
{K_DEC_MOUSE, (char_u *)"DecMouse"},
#ifdef FEAT_MOUSE_JSB
{K_JSBTERM_MOUSE, (char_u *)"JsbMouse"},
#endif
{K_URXVT_MOUSE, (char_u *)"UrxvtMouse"},
{K_SGR_MOUSE, (char_u *)"SgrMouse"},
{K_LEFTMOUSE, (char_u *)"LeftMouse"},

View File

@ -94,9 +94,6 @@
*/
#define KS_TEAROFF 244
/* Used for JSB term mouse. */
#define KS_JSBTERM_MOUSE 243
/* Used a termcap entry that produces a normal character. */
#define KS_KEY 242
@ -415,7 +412,6 @@ enum key_extra {
#define K_NETTERM_MOUSE TERMCAP2KEY(KS_NETTERM_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_URXVT_MOUSE TERMCAP2KEY(KS_URXVT_MOUSE, KE_FILLER)
#define K_SGR_MOUSE TERMCAP2KEY(KS_SGR_MOUSE, KE_FILLER)

View File

@ -572,16 +572,15 @@ EXTERN char_u *p_ttym; /* 'ttymouse' */
EXTERN unsigned ttym_flags;
# ifdef IN_OPTION_C
static char *(p_ttym_values[]) =
{"xterm", "xterm2", "dec", "netterm", "jsbterm", "pterm", "urxvt", "sgr", NULL};
{"xterm", "xterm2", "dec", "netterm", "pterm", "urxvt", "sgr", NULL};
# endif
# define TTYM_XTERM 0x01
# define TTYM_XTERM2 0x02
# define TTYM_DEC 0x04
# define TTYM_NETTERM 0x08
# define TTYM_JSBTERM 0x10
# define TTYM_PTERM 0x20
# define TTYM_URXVT 0x40
# define TTYM_SGR 0x80
# define TTYM_PTERM 0x10
# define TTYM_URXVT 0x20
# define TTYM_SGR 0x40
#endif
EXTERN char_u *p_udir; /* 'undodir' */
EXTERN long p_ul; /* 'undolevels' */

View File

@ -1636,10 +1636,9 @@ int set_termname(char_u *term)
# define HMT_NORMAL 1
# define HMT_NETTERM 2
# define HMT_DEC 4
# define HMT_JSBTERM 8
# define HMT_PTERM 16
# define HMT_URXVT 32
# define HMT_SGR 64
# define HMT_PTERM 8
# define HMT_URXVT 16
# define HMT_SGR 32
static int has_mouse_termcode = 0;
void
@ -1653,11 +1652,6 @@ set_mouse_termcode (
name[0] = n;
name[1] = KE_FILLER;
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)
has_mouse_termcode |= HMT_NETTERM;
else if (n == KS_DEC_MOUSE)
@ -1681,11 +1675,6 @@ del_mouse_termcode (
name[0] = n;
name[1] = KE_FILLER;
del_termcode(name);
# ifdef FEAT_MOUSE_JSB
if (n == KS_JSBTERM_MOUSE)
has_mouse_termcode &= ~HMT_JSBTERM;
else
# endif
if (n == KS_NETTERM_MOUSE)
has_mouse_termcode &= ~HMT_NETTERM;
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 (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_DEC_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;
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) {
/* The DEC Locator Input Model
* Netterm delivers the code sequence:

View File

@ -116,11 +116,6 @@ static char *(features[]) = {
#if defined(UNIX)
"+mouse_dec",
"-mouse_gpm",
# ifdef FEAT_MOUSE_JSB
"+mouse_jsbterm",
# else // ifdef FEAT_MOUSE_JSB
"-mouse_jsbterm",
# endif // ifdef FEAT_MOUSE_JSB
"+mouse_netterm",
#endif // if defined(UNIX)