summaryrefslogtreecommitdiffstats
path: root/patches/source/vim/patches/7.4.187
blob: 122056e4757d6b50a185af713bb89aa37f19dcf8 (plain) (blame)
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
130
131
132
133
134
135
136
To: vim_dev@googlegroups.com
Subject: Patch 7.4.187
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.4.187
Problem:    Delete that crosses line break splits multi-byte character.
Solution:   Advance a character instead of a byte. (Cade Foster)
Files:      src/normal.c, src/testdir/test69.in, src/testdir/test69.ok


*** ../vim-7.4.186/src/normal.c	2014-02-11 15:10:38.134111836 +0100
--- src/normal.c	2014-02-22 23:41:12.472897635 +0100
***************
*** 21,27 ****
  static int	resel_VIsual_mode = NUL;	/* 'v', 'V', or Ctrl-V */
  static linenr_T	resel_VIsual_line_count;	/* number of lines */
  static colnr_T	resel_VIsual_vcol;		/* nr of cols or end col */
! static int	VIsual_mode_orig = NUL;         /* type of Visual mode, that user entered */
  
  static int	restart_VIsual_select = 0;
  #endif
--- 21,27 ----
  static int	resel_VIsual_mode = NUL;	/* 'v', 'V', or Ctrl-V */
  static linenr_T	resel_VIsual_line_count;	/* number of lines */
  static colnr_T	resel_VIsual_vcol;		/* nr of cols or end col */
! static int	VIsual_mode_orig = NUL;		/* saved Visual mode */
  
  static int	restart_VIsual_select = 0;
  #endif
***************
*** 6202,6209 ****
  			    || cap->oap->op_type == OP_CHANGE)
  			&& !lineempty(curwin->w_cursor.lnum))
  		{
! 		    if (*ml_get_cursor() != NUL)
! 			++curwin->w_cursor.col;
  		    cap->retval |= CA_NO_ADJ_OP_END;
  		}
  		continue;
--- 6202,6218 ----
  			    || cap->oap->op_type == OP_CHANGE)
  			&& !lineempty(curwin->w_cursor.lnum))
  		{
! 		    char_u *cp = ml_get_cursor();
! 
! 		    if (*cp != NUL)
! 		    {
! #ifdef FEAT_MBYTE
! 			if (has_mbyte)
! 			    curwin->w_cursor.col += (*mb_ptr2len)(cp);
! 			else
! #endif
! 			    ++curwin->w_cursor.col;
! 		    }
  		    cap->retval |= CA_NO_ADJ_OP_END;
  		}
  		continue;
***************
*** 9482,9488 ****
  # ifdef FEAT_CLIPBOARD
  	    adjust_clip_reg(&regname);
  # endif
!            if (regname == 0 || regname == '"'
  				     || VIM_ISDIGIT(regname) || regname == '-'
  # ifdef FEAT_CLIPBOARD
  		    || (clip_unnamed && (regname == '*' || regname == '+'))
--- 9491,9497 ----
  # ifdef FEAT_CLIPBOARD
  	    adjust_clip_reg(&regname);
  # endif
! 	   if (regname == 0 || regname == '"'
  				     || VIM_ISDIGIT(regname) || regname == '-'
  # ifdef FEAT_CLIPBOARD
  		    || (clip_unnamed && (regname == '*' || regname == '+'))
*** ../vim-7.4.186/src/testdir/test69.in	2013-11-02 23:29:17.000000000 +0100
--- src/testdir/test69.in	2014-02-22 23:38:50.508897861 +0100
***************
*** 155,160 ****
--- 155,170 ----
  aab
  
  STARTTEST
+ :set whichwrap+=h
+ /^x
+ dh
+ :set whichwrap-=h
+ ENDTEST
+ 
+ á
+ x
+ 
+ STARTTEST
  :let a = '.é.' " one char of two bytes
  :let b = '.é.' " normal e with composing char
  /^byteidx
*** ../vim-7.4.186/src/testdir/test69.ok	2013-11-02 23:29:17.000000000 +0100
--- src/testdir/test69.ok	2014-02-22 23:38:53.752897856 +0100
***************
*** 150,155 ****
--- 150,158 ----
  aaa
  
  
+ áx
+ 
+ 
  byteidx
  [0, 1, 3, 4, -1]
  [0, 1, 4, 5, -1]
*** ../vim-7.4.186/src/version.c	2014-02-22 23:03:48.716901208 +0100
--- src/version.c	2014-02-22 23:30:24.412898667 +0100
***************
*** 740,741 ****
--- 740,743 ----
  {   /* Add new patch number below this line */
+ /**/
+     187,
  /**/

-- 
ARTHUR:  Then who is your lord?
WOMAN:   We don't have a lord.
ARTHUR:  What?
DENNIS:  I told you.  We're an anarcho-syndicalist commune.  We take it in
         turns to act as a sort of executive officer for the week.
                                  The Quest for the Holy Grail (Monty Python)

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