summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0179
blob: e7e4aac002a70f4abd559c1f068805599862648b (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
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0179
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.0179
Problem:    Redundant condition for boundary check.
Solution:   Remove the condition. (Dominique Pelle). Change FALSE to FAIL.
Files:	    src/undo.c


*** ../vim-8.1.0178/src/undo.c	2018-07-08 16:50:33.111216814 +0200
--- src/undo.c	2018-07-13 16:27:37.721354663 +0200
***************
*** 266,275 ****
      if (undo_off)
  	return OK;
  
!     if (top > curbuf->b_ml.ml_line_count
! 	    || top >= bot
! 	    || bot > curbuf->b_ml.ml_line_count + 1)
! 	return FALSE;	/* rely on caller to do error messages */
  
      if (top + 2 == bot)
  	u_saveline((linenr_T)(top + 1));
--- 266,273 ----
      if (undo_off)
  	return OK;
  
!     if (top >= bot || bot > curbuf->b_ml.ml_line_count + 1)
! 	return FAIL;	// rely on caller to give an error message
  
      if (top + 2 == bot)
  	u_saveline((linenr_T)(top + 1));
*** ../vim-8.1.0178/src/version.c	2018-07-11 22:57:47.947564638 +0200
--- src/version.c	2018-07-13 16:29:28.492772093 +0200
***************
*** 791,792 ****
--- 791,794 ----
  {   /* Add new patch number below this line */
+ /**/
+     179,
  /**/

-- 
"The amigos also appear to be guilty of not citing the work of others who had
gone before them.  Even worse, they have a chapter about modeling time and
space without making a single reference to Star Trek!"
			(Scott Ambler, reviewing the UML User Guide)

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