Skip to content

Commit 76948c2

Browse files
committed
updated for version 7.4.025
Problem: Reading before start of a string. Solution: Do not call mb_ptr_back() at start of a string. (Dominique Pelle)
1 parent 6e7b06d commit 76948c2

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/edit.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5187,11 +5187,13 @@ ins_complete(c)
51875187

51885188
/* Go back to just before the first filename character. */
51895189
mb_ptr_back(line, p);
5190-
while (vim_isfilec(PTR2CHAR(p)) && p >= line)
5190+
while (p > line && vim_isfilec(PTR2CHAR(p)))
51915191
mb_ptr_back(line, p);
5192-
startcol = (int)(p - line);
5192+
startcol = (int)(p - line) + 1;
5193+
if (p == line && vim_isfilec(PTR2CHAR(p)))
5194+
startcol = 0;
51935195

5194-
compl_col += ++startcol;
5196+
compl_col += startcol;
51955197
compl_length = (int)curs_col - startcol;
51965198
compl_pattern = addstar(line + compl_col, compl_length,
51975199
EXPAND_FILES);

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@ static char *(features[]) =
738738

739739
static int included_patches[] =
740740
{ /* Add new patch number below this line */
741+
/**/
742+
25,
741743
/**/
742744
24,
743745
/**/

0 commit comments

Comments
 (0)