summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0886
blob: c1e745ac8ea518dda376cae36f8bb64b5b3e4587 (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
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0886
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.0886
Problem:    Compiler warning for adding to NULL pointer and a condition that
            is always true.
Solution:   Check for NULL pointer before adding. Remove useless "if".
            (Friedirch, closes #3913)
Files:	    src/dosinst.c, src/search.c


*** ../vim-8.1.0885/src/dosinst.c	2019-01-11 20:37:07.714787395 +0100
--- src/dosinst.c	2019-02-10 21:44:56.458673533 +0100
***************
*** 291,306 ****
  {
      char	*bp = *destination;
      size_t	indir_l = strlen(installdir);
!     char	*cp = bp + indir_l;
      char	*tmpname;
      char	*farname;
  
      /*
       * No action needed if exe not found or not in this directory.
       */
!     if (bp == NULL
! 	    || strnicmp(bp, installdir, indir_l) != 0
! 	    || strchr("/\\", *cp++) == NULL
  	    || strchr(cp, '\\') != NULL
  	    || strchr(cp, '/') != NULL)
  	return;
--- 291,307 ----
  {
      char	*bp = *destination;
      size_t	indir_l = strlen(installdir);
!     char	*cp;
      char	*tmpname;
      char	*farname;
  
      /*
       * No action needed if exe not found or not in this directory.
       */
!     if (bp == NULL || strnicmp(bp, installdir, indir_l) != 0)
! 	return;
!     cp = bp + indir_l;
!     if (strchr("/\\", *cp++) == NULL
  	    || strchr(cp, '\\') != NULL
  	    || strchr(cp, '/') != NULL)
  	return;
*** ../vim-8.1.0885/src/search.c	2019-01-31 18:26:05.738803509 +0100
--- src/search.c	2019-02-10 21:47:06.509782946 +0100
***************
*** 4732,4749 ****
      VIsual_active = TRUE;
      VIsual_mode = 'v';
  
!     if (VIsual_active)
      {
! 	redraw_curbuf_later(INVERTED);	/* update the inversion */
! 	if (*p_sel == 'e')
! 	{
! 	    /* Correction for exclusive selection depends on the direction. */
! 	    if (forward && LTOREQ_POS(VIsual, curwin->w_cursor))
! 		inc_cursor();
! 	    else if (!forward && LTOREQ_POS(curwin->w_cursor, VIsual))
! 		inc(&VIsual);
! 	}
! 
      }
  
  #ifdef FEAT_FOLDING
--- 4732,4745 ----
      VIsual_active = TRUE;
      VIsual_mode = 'v';
  
!     redraw_curbuf_later(INVERTED);	/* update the inversion */
!     if (*p_sel == 'e')
      {
! 	/* Correction for exclusive selection depends on the direction. */
! 	if (forward && LTOREQ_POS(VIsual, curwin->w_cursor))
! 	    inc_cursor();
! 	else if (!forward && LTOREQ_POS(curwin->w_cursor, VIsual))
! 	    inc(&VIsual);
      }
  
  #ifdef FEAT_FOLDING
*** ../vim-8.1.0885/src/version.c	2019-02-09 11:13:07.003647800 +0100
--- src/version.c	2019-02-10 21:43:46.203156639 +0100
***************
*** 785,786 ****
--- 785,788 ----
  {   /* Add new patch number below this line */
+ /**/
+     886,
  /**/

-- 
LETTERS TO THE EDITOR (The Times of London)

Dear Sir,

I am firmly opposed to the spread of microchips either to the home or
to the office.  We have more than enough of them foisted upon us in
public places.  They are a disgusting Americanism, and can only result
in the farmers being forced to grow smaller potatoes, which in turn
will cause massive unemployment in the already severely depressed
agricultural industry.

Yours faithfully,
        Capt. Quinton D'Arcy, J. P.
        Sevenoaks

 /// 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    ///