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
|
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0975
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.0975
Problem: Using STRNCPY() wrongly. Warning for uninitialized variable.
Solution: Use mch_memmove(). Initialize variable. (Yasuhiro Matsumoto,
closes #3979)
Files: src/screen.c, src/textprop.c
*** ../vim-8.1.0974/src/screen.c 2019-02-17 17:44:36.219875473 +0100
--- src/screen.c 2019-02-22 19:07:05.421051380 +0100
***************
*** 2547,2556 ****
{
#ifdef FEAT_RIGHTLEFT
if (wp->w_p_rl)
! STRNCPY(current_ScreenLine, text, len);
else
#endif
! STRNCPY(current_ScreenLine + col, text, len);
col += len;
}
}
--- 2547,2556 ----
{
#ifdef FEAT_RIGHTLEFT
if (wp->w_p_rl)
! mch_memmove(current_ScreenLine, text, len);
else
#endif
! mch_memmove(current_ScreenLine + col, text, len);
col += len;
}
}
***************
*** 3396,3402 ****
{
if (lnum == curwin->w_cursor.lnum)
getvcol(curwin, &(curwin->w_cursor),
! (colnr_T *)&fromcol, NULL, NULL);
else
fromcol = 0;
if (lnum == curwin->w_cursor.lnum + search_match_lines)
--- 3396,3402 ----
{
if (lnum == curwin->w_cursor.lnum)
getvcol(curwin, &(curwin->w_cursor),
! (colnr_T *)&fromcol, NULL, NULL);
else
fromcol = 0;
if (lnum == curwin->w_cursor.lnum + search_match_lines)
*** ../vim-8.1.0974/src/textprop.c 2019-01-13 23:38:33.415773131 +0100
--- src/textprop.c 2019-02-22 19:09:28.700119037 +0100
***************
*** 17,22 ****
--- 17,23 ----
* Text properties have a type, which can be used to specify highlighting.
*
* TODO:
+ * - When using 'cursorline' attributes should be merged. (#3912)
* - Adjust text property column and length when text is inserted/deleted.
* -> a :substitute with a multi-line match
* -> search for changed_bytes() from misc1.c
***************
*** 27,33 ****
* the index, like DB_MARKED?
* - Also test line2byte() with many lines, so that ml_updatechunk() is taken
* into account.
! * - add mechanism to keep track of changed lines.
*/
#include "vim.h"
--- 28,37 ----
* the index, like DB_MARKED?
* - Also test line2byte() with many lines, so that ml_updatechunk() is taken
* into account.
! * - Add mechanism to keep track of changed lines, so that plugin can update
! * text properties in these.
! * - Perhaps have a window-local option to disable highlighting from text
! * properties?
*/
#include "vim.h"
***************
*** 158,164 ****
char_u *newtext;
int proplen;
size_t textlen;
! char_u *props;
char_u *newprops;
textprop_T tmp_prop;
int i;
--- 162,168 ----
char_u *newtext;
int proplen;
size_t textlen;
! char_u *props = NULL;
char_u *newprops;
textprop_T tmp_prop;
int i;
*** ../vim-8.1.0974/src/version.c 2019-02-22 17:56:02.787842436 +0100
--- src/version.c 2019-02-22 19:12:30.286948558 +0100
***************
*** 781,782 ****
--- 781,784 ----
{ /* Add new patch number below this line */
+ /**/
+ 975,
/**/
--
hundred-and-one symptoms of being an internet addict:
19. All of your friends have an @ in their names.
/// 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 ///
|