summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.1267
blob: f94fe40503f56fceb0f27f1850e4bd7614fea6d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1267
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.1267
Problem:    Cannot check if GPM mouse support is working.
Solution:   Add the "mouse_gpm_enable" feature.
Files:	    src/evalfunc.c, src/os_unix.c, src/proto/os_unix.pro,
            runtime/doc/eval.txt


*** ../vim-8.1.1266/src/evalfunc.c	2019-05-04 15:47:25.629423511 +0200
--- src/evalfunc.c	2019-05-04 17:14:45.007701328 +0200
***************
*** 6810,6815 ****
--- 6810,6819 ----
  	else if (STRICMP(name, "netbeans_enabled") == 0)
  	    n = netbeans_active();
  #endif
+ #ifdef FEAT_MOUSE_GPM
+ 	else if (STRICMP(name, "mouse_gpm_enabled") == 0)
+ 	    n = gpm_enabled();
+ #endif
  #if defined(FEAT_TERMINAL) && defined(MSWIN)
  	else if (STRICMP(name, "terminal") == 0)
  	    n = terminal_enabled();
*** ../vim-8.1.1266/src/os_unix.c	2019-05-04 16:58:41.617537336 +0200
--- src/os_unix.c	2019-05-04 17:32:01.574164411 +0200
***************
*** 7022,7028 ****
  }
  #endif /* !HAVE_RENAME */
  
! #ifdef FEAT_MOUSE_GPM
  /*
   * Initializes connection with gpm (if it isn't already opened)
   * Return 1 if succeeded (or connection already opened), 0 if failed
--- 7022,7028 ----
  }
  #endif /* !HAVE_RENAME */
  
! #if defined(FEAT_MOUSE_GPM) || defined(PROTO)
  /*
   * Initializes connection with gpm (if it isn't already opened)
   * Return 1 if succeeded (or connection already opened), 0 if failed
***************
*** 7059,7070 ****
  }
  
  /*
   * Closes connection to gpm
   */
      static void
  gpm_close(void)
  {
!     if (gpm_flag && gpm_fd >= 0) /* if Open */
  	Gpm_Close();
  }
  
--- 7059,7079 ----
  }
  
  /*
+  * Returns TRUE if the GPM mouse is enabled.
+  */
+     int
+ gpm_enabled(void)
+ {
+     return gpm_flag && gpm_fd >= 0;
+ }
+ 
+ /*
   * Closes connection to gpm
   */
      static void
  gpm_close(void)
  {
!     if (gpm_enabled())
  	Gpm_Close();
  }
  
*** ../vim-8.1.1266/src/proto/os_unix.pro	2019-04-28 22:50:36.157248454 +0200
--- src/proto/os_unix.pro	2019-05-04 17:16:15.015180036 +0200
***************
*** 72,77 ****
--- 72,78 ----
  int mch_has_exp_wildcard(char_u *p);
  int mch_has_wildcard(char_u *p);
  int mch_rename(const char *src, const char *dest);
+ int gpm_enabled(void);
  int mch_libcall(char_u *libname, char_u *funcname, char_u *argstring, int argint, char_u **string_result, int *number_result);
  void setup_term_clip(void);
  void start_xterm_trace(int button);
*** ../vim-8.1.1266/runtime/doc/eval.txt	2019-05-04 15:47:25.633423491 +0200
--- runtime/doc/eval.txt	2019-05-04 17:33:42.425616784 +0200
***************
*** 10470,10475 ****
--- 10532,10538 ----
  mouse			Compiled with support mouse.
  mouse_dec		Compiled with support for Dec terminal mouse.
  mouse_gpm		Compiled with support for gpm (Linux console mouse)
+ mouse_gpm_enabled	GPM mouse is working
  mouse_netterm		Compiled with support for netterm mouse.
  mouse_pterm		Compiled with support for qnx pterm mouse.
  mouse_sysmouse		Compiled with support for sysmouse (*BSD console mouse)
*** ../vim-8.1.1266/src/version.c	2019-05-04 17:30:02.502806618 +0200
--- src/version.c	2019-05-04 17:31:16.134410093 +0200
***************
*** 769,770 ****
--- 769,772 ----
  {   /* Add new patch number below this line */
+ /**/
+     1267,
  /**/

-- 
LAUNCELOT: Isn't there a St. Aaaaarrrrrrggghhh's in Cornwall?
ARTHUR:    No, that's Saint Ives.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///