|
Karsten Hopp |
ef8d68 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
ef8d68 |
Subject: Patch 7.4.783
|
|
Karsten Hopp |
ef8d68 |
Fcc: outbox
|
|
Karsten Hopp |
ef8d68 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
ef8d68 |
Mime-Version: 1.0
|
|
Karsten Hopp |
ef8d68 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
ef8d68 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
ef8d68 |
------------
|
|
Karsten Hopp |
ef8d68 |
|
|
Karsten Hopp |
ef8d68 |
Patch 7.4.783
|
|
Karsten Hopp |
ef8d68 |
Problem: copy_chars() and copy_spaces() are inefficient.
|
|
Karsten Hopp |
ef8d68 |
Solution: Use memset() instead. (Dominique Pelle)
|
|
Karsten Hopp |
ef8d68 |
Files: src/ex_getln.c, src/misc2.c, src/ops.c, src/proto/misc2.pro,
|
|
Karsten Hopp |
ef8d68 |
src/screen.c
|
|
Karsten Hopp |
ef8d68 |
|
|
Karsten Hopp |
ef8d68 |
|
|
Karsten Hopp |
ef8d68 |
*** ../vim-7.4.782/src/ex_getln.c 2015-07-17 13:03:42.100357542 +0200
|
|
Karsten Hopp |
ef8d68 |
--- src/ex_getln.c 2015-07-17 13:11:12.608078272 +0200
|
|
Karsten Hopp |
ef8d68 |
***************
|
|
Karsten Hopp |
ef8d68 |
*** 250,256 ****
|
|
Karsten Hopp |
ef8d68 |
/* autoindent for :insert and :append */
|
|
Karsten Hopp |
ef8d68 |
if (firstc <= 0)
|
|
Karsten Hopp |
ef8d68 |
{
|
|
Karsten Hopp |
ef8d68 |
! copy_spaces(ccline.cmdbuff, indent);
|
|
Karsten Hopp |
ef8d68 |
ccline.cmdbuff[indent] = NUL;
|
|
Karsten Hopp |
ef8d68 |
ccline.cmdpos = indent;
|
|
Karsten Hopp |
ef8d68 |
ccline.cmdspos = indent;
|
|
Karsten Hopp |
ef8d68 |
--- 250,256 ----
|
|
Karsten Hopp |
ef8d68 |
/* autoindent for :insert and :append */
|
|
Karsten Hopp |
ef8d68 |
if (firstc <= 0)
|
|
Karsten Hopp |
ef8d68 |
{
|
|
Karsten Hopp |
ef8d68 |
! vim_memset(ccline.cmdbuff, ' ', indent);
|
|
Karsten Hopp |
ef8d68 |
ccline.cmdbuff[indent] = NUL;
|
|
Karsten Hopp |
ef8d68 |
ccline.cmdpos = indent;
|
|
Karsten Hopp |
ef8d68 |
ccline.cmdspos = indent;
|
|
Karsten Hopp |
ef8d68 |
*** ../vim-7.4.782/src/misc2.c 2015-07-17 13:03:42.104357503 +0200
|
|
Karsten Hopp |
ef8d68 |
--- src/misc2.c 2015-07-17 13:11:12.608078272 +0200
|
|
Karsten Hopp |
ef8d68 |
***************
|
|
Karsten Hopp |
ef8d68 |
*** 1600,1639 ****
|
|
Karsten Hopp |
ef8d68 |
#endif
|
|
Karsten Hopp |
ef8d68 |
|
|
Karsten Hopp |
ef8d68 |
/*
|
|
Karsten Hopp |
ef8d68 |
- * copy a space a number of times
|
|
Karsten Hopp |
ef8d68 |
- */
|
|
Karsten Hopp |
ef8d68 |
- void
|
|
Karsten Hopp |
ef8d68 |
- copy_spaces(ptr, count)
|
|
Karsten Hopp |
ef8d68 |
- char_u *ptr;
|
|
Karsten Hopp |
ef8d68 |
- size_t count;
|
|
Karsten Hopp |
ef8d68 |
- {
|
|
Karsten Hopp |
ef8d68 |
- size_t i = count;
|
|
Karsten Hopp |
ef8d68 |
- char_u *p = ptr;
|
|
Karsten Hopp |
ef8d68 |
-
|
|
Karsten Hopp |
ef8d68 |
- while (i--)
|
|
Karsten Hopp |
ef8d68 |
- *p++ = ' ';
|
|
Karsten Hopp |
ef8d68 |
- }
|
|
Karsten Hopp |
ef8d68 |
-
|
|
Karsten Hopp |
ef8d68 |
- #if defined(FEAT_VISUALEXTRA) || defined(PROTO)
|
|
Karsten Hopp |
ef8d68 |
- /*
|
|
Karsten Hopp |
ef8d68 |
- * Copy a character a number of times.
|
|
Karsten Hopp |
ef8d68 |
- * Does not work for multi-byte characters!
|
|
Karsten Hopp |
ef8d68 |
- */
|
|
Karsten Hopp |
ef8d68 |
- void
|
|
Karsten Hopp |
ef8d68 |
- copy_chars(ptr, count, c)
|
|
Karsten Hopp |
ef8d68 |
- char_u *ptr;
|
|
Karsten Hopp |
ef8d68 |
- size_t count;
|
|
Karsten Hopp |
ef8d68 |
- int c;
|
|
Karsten Hopp |
ef8d68 |
- {
|
|
Karsten Hopp |
ef8d68 |
- size_t i = count;
|
|
Karsten Hopp |
ef8d68 |
- char_u *p = ptr;
|
|
Karsten Hopp |
ef8d68 |
-
|
|
Karsten Hopp |
ef8d68 |
- while (i--)
|
|
Karsten Hopp |
ef8d68 |
- *p++ = c;
|
|
Karsten Hopp |
ef8d68 |
- }
|
|
Karsten Hopp |
ef8d68 |
- #endif
|
|
Karsten Hopp |
ef8d68 |
-
|
|
Karsten Hopp |
ef8d68 |
- /*
|
|
Karsten Hopp |
ef8d68 |
* delete spaces at the end of a string
|
|
Karsten Hopp |
ef8d68 |
*/
|
|
Karsten Hopp |
ef8d68 |
void
|
|
Karsten Hopp |
ef8d68 |
--- 1600,1605 ----
|
|
Karsten Hopp |
ef8d68 |
*** ../vim-7.4.782/src/ops.c 2015-07-17 13:03:42.108357465 +0200
|
|
Karsten Hopp |
ef8d68 |
--- src/ops.c 2015-07-17 13:11:12.612078233 +0200
|
|
Karsten Hopp |
ef8d68 |
***************
|
|
Karsten Hopp |
ef8d68 |
*** 442,449 ****
|
|
Karsten Hopp |
ef8d68 |
return;
|
|
Karsten Hopp |
ef8d68 |
vim_memset(newp, NUL, (size_t)(bd.textcol + i + j + len));
|
|
Karsten Hopp |
ef8d68 |
mch_memmove(newp, oldp, (size_t)bd.textcol);
|
|
Karsten Hopp |
ef8d68 |
! copy_chars(newp + bd.textcol, (size_t)i, TAB);
|
|
Karsten Hopp |
ef8d68 |
! copy_spaces(newp + bd.textcol + i, (size_t)j);
|
|
Karsten Hopp |
ef8d68 |
/* the end */
|
|
Karsten Hopp |
ef8d68 |
mch_memmove(newp + bd.textcol + i + j, bd.textstart, (size_t)len);
|
|
Karsten Hopp |
ef8d68 |
}
|
|
Karsten Hopp |
ef8d68 |
--- 442,449 ----
|
|
Karsten Hopp |
ef8d68 |
return;
|
|
Karsten Hopp |
ef8d68 |
vim_memset(newp, NUL, (size_t)(bd.textcol + i + j + len));
|
|
Karsten Hopp |
ef8d68 |
mch_memmove(newp, oldp, (size_t)bd.textcol);
|
|
Karsten Hopp |
ef8d68 |
! vim_memset(newp + bd.textcol, TAB, (size_t)i);
|
|
Karsten Hopp |
ef8d68 |
! vim_memset(newp + bd.textcol + i, ' ', (size_t)j);
|
|
Karsten Hopp |
ef8d68 |
/* the end */
|
|
Karsten Hopp |
ef8d68 |
mch_memmove(newp + bd.textcol + i + j, bd.textstart, (size_t)len);
|
|
Karsten Hopp |
ef8d68 |
}
|
|
Karsten Hopp |
ef8d68 |
***************
|
|
Karsten Hopp |
ef8d68 |
*** 535,541 ****
|
|
Karsten Hopp |
ef8d68 |
if (newp == NULL)
|
|
Karsten Hopp |
ef8d68 |
return;
|
|
Karsten Hopp |
ef8d68 |
mch_memmove(newp, oldp, (size_t)(verbatim_copy_end - oldp));
|
|
Karsten Hopp |
ef8d68 |
! copy_spaces(newp + (verbatim_copy_end - oldp), (size_t)fill);
|
|
Karsten Hopp |
ef8d68 |
STRMOVE(newp + (verbatim_copy_end - oldp) + fill, non_white);
|
|
Karsten Hopp |
ef8d68 |
}
|
|
Karsten Hopp |
ef8d68 |
/* replace the line */
|
|
Karsten Hopp |
ef8d68 |
--- 535,541 ----
|
|
Karsten Hopp |
ef8d68 |
if (newp == NULL)
|
|
Karsten Hopp |
ef8d68 |
return;
|
|
Karsten Hopp |
ef8d68 |
mch_memmove(newp, oldp, (size_t)(verbatim_copy_end - oldp));
|
|
Karsten Hopp |
ef8d68 |
! vim_memset(newp + (verbatim_copy_end - oldp), ' ', (size_t)fill);
|
|
Karsten Hopp |
ef8d68 |
STRMOVE(newp + (verbatim_copy_end - oldp) + fill, non_white);
|
|
Karsten Hopp |
ef8d68 |
}
|
|
Karsten Hopp |
ef8d68 |
/* replace the line */
|
|
Karsten Hopp |
ef8d68 |
***************
|
|
Karsten Hopp |
ef8d68 |
*** 638,644 ****
|
|
Karsten Hopp |
ef8d68 |
oldp += offset;
|
|
Karsten Hopp |
ef8d68 |
|
|
Karsten Hopp |
ef8d68 |
/* insert pre-padding */
|
|
Karsten Hopp |
ef8d68 |
! copy_spaces(newp + offset, (size_t)spaces);
|
|
Karsten Hopp |
ef8d68 |
|
|
Karsten Hopp |
ef8d68 |
/* copy the new text */
|
|
Karsten Hopp |
ef8d68 |
mch_memmove(newp + offset + spaces, s, (size_t)s_len);
|
|
Karsten Hopp |
ef8d68 |
--- 638,644 ----
|
|
Karsten Hopp |
ef8d68 |
oldp += offset;
|
|
Karsten Hopp |
ef8d68 |
|
|
Karsten Hopp |
ef8d68 |
/* insert pre-padding */
|
|
Karsten Hopp |
ef8d68 |
! vim_memset(newp + offset, ' ', (size_t)spaces);
|
|
Karsten Hopp |
ef8d68 |
|
|
Karsten Hopp |
ef8d68 |
/* copy the new text */
|
|
Karsten Hopp |
ef8d68 |
mch_memmove(newp + offset + spaces, s, (size_t)s_len);
|
|
Karsten Hopp |
ef8d68 |
***************
|
|
Karsten Hopp |
ef8d68 |
*** 647,653 ****
|
|
Karsten Hopp |
ef8d68 |
if (spaces && !bdp->is_short)
|
|
Karsten Hopp |
ef8d68 |
{
|
|
Karsten Hopp |
ef8d68 |
/* insert post-padding */
|
|
Karsten Hopp |
ef8d68 |
! copy_spaces(newp + offset + spaces, (size_t)(p_ts - spaces));
|
|
Karsten Hopp |
ef8d68 |
/* We're splitting a TAB, don't copy it. */
|
|
Karsten Hopp |
ef8d68 |
oldp++;
|
|
Karsten Hopp |
ef8d68 |
/* We allowed for that TAB, remember this now */
|
|
Karsten Hopp |
ef8d68 |
--- 647,653 ----
|
|
Karsten Hopp |
ef8d68 |
if (spaces && !bdp->is_short)
|
|
Karsten Hopp |
ef8d68 |
{
|
|
Karsten Hopp |
ef8d68 |
/* insert post-padding */
|
|
Karsten Hopp |
ef8d68 |
! vim_memset(newp + offset + spaces, ' ', (size_t)(p_ts - spaces));
|
|
Karsten Hopp |
ef8d68 |
/* We're splitting a TAB, don't copy it. */
|
|
Karsten Hopp |
ef8d68 |
oldp++;
|
|
Karsten Hopp |
ef8d68 |
/* We allowed for that TAB, remember this now */
|
|
Karsten Hopp |
ef8d68 |
***************
|
|
Karsten Hopp |
ef8d68 |
*** 1831,1837 ****
|
|
Karsten Hopp |
ef8d68 |
/* copy up to deleted part */
|
|
Karsten Hopp |
ef8d68 |
mch_memmove(newp, oldp, (size_t)bd.textcol);
|
|
Karsten Hopp |
ef8d68 |
/* insert spaces */
|
|
Karsten Hopp |
ef8d68 |
! copy_spaces(newp + bd.textcol,
|
|
Karsten Hopp |
ef8d68 |
(size_t)(bd.startspaces + bd.endspaces));
|
|
Karsten Hopp |
ef8d68 |
/* copy the part after the deleted part */
|
|
Karsten Hopp |
ef8d68 |
oldp += bd.textcol + bd.textlen;
|
|
Karsten Hopp |
ef8d68 |
--- 1831,1837 ----
|
|
Karsten Hopp |
ef8d68 |
/* copy up to deleted part */
|
|
Karsten Hopp |
ef8d68 |
mch_memmove(newp, oldp, (size_t)bd.textcol);
|
|
Karsten Hopp |
ef8d68 |
/* insert spaces */
|
|
Karsten Hopp |
ef8d68 |
! vim_memset(newp + bd.textcol, ' ',
|
|
Karsten Hopp |
ef8d68 |
(size_t)(bd.startspaces + bd.endspaces));
|
|
Karsten Hopp |
ef8d68 |
/* copy the part after the deleted part */
|
|
Karsten Hopp |
ef8d68 |
oldp += bd.textcol + bd.textlen;
|
|
Karsten Hopp |
ef8d68 |
***************
|
|
Karsten Hopp |
ef8d68 |
*** 2132,2138 ****
|
|
Karsten Hopp |
ef8d68 |
mch_memmove(newp, oldp, (size_t)bd.textcol);
|
|
Karsten Hopp |
ef8d68 |
oldp += bd.textcol + bd.textlen;
|
|
Karsten Hopp |
ef8d68 |
/* insert pre-spaces */
|
|
Karsten Hopp |
ef8d68 |
! copy_spaces(newp + bd.textcol, (size_t)bd.startspaces);
|
|
Karsten Hopp |
ef8d68 |
/* insert replacement chars CHECK FOR ALLOCATED SPACE */
|
|
Karsten Hopp |
ef8d68 |
/* -1/-2 is used for entering CR literally. */
|
|
Karsten Hopp |
ef8d68 |
if (had_ctrl_v_cr || (c != '\r' && c != '\n'))
|
|
Karsten Hopp |
ef8d68 |
--- 2132,2138 ----
|
|
Karsten Hopp |
ef8d68 |
mch_memmove(newp, oldp, (size_t)bd.textcol);
|
|
Karsten Hopp |
ef8d68 |
oldp += bd.textcol + bd.textlen;
|
|
Karsten Hopp |
ef8d68 |
/* insert pre-spaces */
|
|
Karsten Hopp |
ef8d68 |
! vim_memset(newp + bd.textcol, ' ', (size_t)bd.startspaces);
|
|
Karsten Hopp |
ef8d68 |
/* insert replacement chars CHECK FOR ALLOCATED SPACE */
|
|
Karsten Hopp |
ef8d68 |
/* -1/-2 is used for entering CR literally. */
|
|
Karsten Hopp |
ef8d68 |
if (had_ctrl_v_cr || (c != '\r' && c != '\n'))
|
|
Karsten Hopp |
ef8d68 |
***************
|
|
Karsten Hopp |
ef8d68 |
*** 2146,2156 ****
|
|
Karsten Hopp |
ef8d68 |
}
|
|
Karsten Hopp |
ef8d68 |
else
|
|
Karsten Hopp |
ef8d68 |
#endif
|
|
Karsten Hopp |
ef8d68 |
! copy_chars(newp + STRLEN(newp), (size_t)numc, c);
|
|
Karsten Hopp |
ef8d68 |
if (!bd.is_short)
|
|
Karsten Hopp |
ef8d68 |
{
|
|
Karsten Hopp |
ef8d68 |
/* insert post-spaces */
|
|
Karsten Hopp |
ef8d68 |
! copy_spaces(newp + STRLEN(newp), (size_t)bd.endspaces);
|
|
Karsten Hopp |
ef8d68 |
/* copy the part after the changed part */
|
|
Karsten Hopp |
ef8d68 |
STRMOVE(newp + STRLEN(newp), oldp);
|
|
Karsten Hopp |
ef8d68 |
}
|
|
Karsten Hopp |
ef8d68 |
--- 2146,2156 ----
|
|
Karsten Hopp |
ef8d68 |
}
|
|
Karsten Hopp |
ef8d68 |
else
|
|
Karsten Hopp |
ef8d68 |
#endif
|
|
Karsten Hopp |
ef8d68 |
! vim_memset(newp + STRLEN(newp), c, (size_t)numc);
|
|
Karsten Hopp |
ef8d68 |
if (!bd.is_short)
|
|
Karsten Hopp |
ef8d68 |
{
|
|
Karsten Hopp |
ef8d68 |
/* insert post-spaces */
|
|
Karsten Hopp |
ef8d68 |
! vim_memset(newp + STRLEN(newp), ' ', (size_t)bd.endspaces);
|
|
Karsten Hopp |
ef8d68 |
/* copy the part after the changed part */
|
|
Karsten Hopp |
ef8d68 |
STRMOVE(newp + STRLEN(newp), oldp);
|
|
Karsten Hopp |
ef8d68 |
}
|
|
Karsten Hopp |
ef8d68 |
***************
|
|
Karsten Hopp |
ef8d68 |
*** 2831,2837 ****
|
|
Karsten Hopp |
ef8d68 |
mch_memmove(newp, oldp, (size_t)bd.textcol);
|
|
Karsten Hopp |
ef8d68 |
offset = bd.textcol;
|
|
Karsten Hopp |
ef8d68 |
# ifdef FEAT_VIRTUALEDIT
|
|
Karsten Hopp |
ef8d68 |
! copy_spaces(newp + offset, (size_t)vpos.coladd);
|
|
Karsten Hopp |
ef8d68 |
offset += vpos.coladd;
|
|
Karsten Hopp |
ef8d68 |
# endif
|
|
Karsten Hopp |
ef8d68 |
mch_memmove(newp + offset, ins_text, (size_t)ins_len);
|
|
Karsten Hopp |
ef8d68 |
--- 2831,2837 ----
|
|
Karsten Hopp |
ef8d68 |
mch_memmove(newp, oldp, (size_t)bd.textcol);
|
|
Karsten Hopp |
ef8d68 |
offset = bd.textcol;
|
|
Karsten Hopp |
ef8d68 |
# ifdef FEAT_VIRTUALEDIT
|
|
Karsten Hopp |
ef8d68 |
! vim_memset(newp + offset, ' ', (size_t)vpos.coladd);
|
|
Karsten Hopp |
ef8d68 |
offset += vpos.coladd;
|
|
Karsten Hopp |
ef8d68 |
# endif
|
|
Karsten Hopp |
ef8d68 |
mch_memmove(newp + offset, ins_text, (size_t)ins_len);
|
|
Karsten Hopp |
ef8d68 |
***************
|
|
Karsten Hopp |
ef8d68 |
*** 3272,3282 ****
|
|
Karsten Hopp |
ef8d68 |
== NULL)
|
|
Karsten Hopp |
ef8d68 |
return FAIL;
|
|
Karsten Hopp |
ef8d68 |
y_current->y_array[y_idx] = pnew;
|
|
Karsten Hopp |
ef8d68 |
! copy_spaces(pnew, (size_t)bd->startspaces);
|
|
Karsten Hopp |
ef8d68 |
pnew += bd->startspaces;
|
|
Karsten Hopp |
ef8d68 |
mch_memmove(pnew, bd->textstart, (size_t)bd->textlen);
|
|
Karsten Hopp |
ef8d68 |
pnew += bd->textlen;
|
|
Karsten Hopp |
ef8d68 |
! copy_spaces(pnew, (size_t)bd->endspaces);
|
|
Karsten Hopp |
ef8d68 |
pnew += bd->endspaces;
|
|
Karsten Hopp |
ef8d68 |
*pnew = NUL;
|
|
Karsten Hopp |
ef8d68 |
return OK;
|
|
Karsten Hopp |
ef8d68 |
--- 3272,3282 ----
|
|
Karsten Hopp |
ef8d68 |
== NULL)
|
|
Karsten Hopp |
ef8d68 |
return FAIL;
|
|
Karsten Hopp |
ef8d68 |
y_current->y_array[y_idx] = pnew;
|
|
Karsten Hopp |
ef8d68 |
! vim_memset(pnew, ' ', (size_t)bd->startspaces);
|
|
Karsten Hopp |
ef8d68 |
pnew += bd->startspaces;
|
|
Karsten Hopp |
ef8d68 |
mch_memmove(pnew, bd->textstart, (size_t)bd->textlen);
|
|
Karsten Hopp |
ef8d68 |
pnew += bd->textlen;
|
|
Karsten Hopp |
ef8d68 |
! vim_memset(pnew, ' ', (size_t)bd->endspaces);
|
|
Karsten Hopp |
ef8d68 |
pnew += bd->endspaces;
|
|
Karsten Hopp |
ef8d68 |
*pnew = NUL;
|
|
Karsten Hopp |
ef8d68 |
return OK;
|
|
Karsten Hopp |
ef8d68 |
***************
|
|
Karsten Hopp |
ef8d68 |
*** 3690,3696 ****
|
|
Karsten Hopp |
ef8d68 |
mch_memmove(ptr, oldp, (size_t)bd.textcol);
|
|
Karsten Hopp |
ef8d68 |
ptr += bd.textcol;
|
|
Karsten Hopp |
ef8d68 |
/* may insert some spaces before the new text */
|
|
Karsten Hopp |
ef8d68 |
! copy_spaces(ptr, (size_t)bd.startspaces);
|
|
Karsten Hopp |
ef8d68 |
ptr += bd.startspaces;
|
|
Karsten Hopp |
ef8d68 |
/* insert the new text */
|
|
Karsten Hopp |
ef8d68 |
for (j = 0; j < count; ++j)
|
|
Karsten Hopp |
ef8d68 |
--- 3690,3696 ----
|
|
Karsten Hopp |
ef8d68 |
mch_memmove(ptr, oldp, (size_t)bd.textcol);
|
|
Karsten Hopp |
ef8d68 |
ptr += bd.textcol;
|
|
Karsten Hopp |
ef8d68 |
/* may insert some spaces before the new text */
|
|
Karsten Hopp |
ef8d68 |
! vim_memset(ptr, ' ', (size_t)bd.startspaces);
|
|
Karsten Hopp |
ef8d68 |
ptr += bd.startspaces;
|
|
Karsten Hopp |
ef8d68 |
/* insert the new text */
|
|
Karsten Hopp |
ef8d68 |
for (j = 0; j < count; ++j)
|
|
Karsten Hopp |
ef8d68 |
***************
|
|
Karsten Hopp |
ef8d68 |
*** 3701,3712 ****
|
|
Karsten Hopp |
ef8d68 |
/* insert block's trailing spaces only if there's text behind */
|
|
Karsten Hopp |
ef8d68 |
if ((j < count - 1 || !shortline) && spaces)
|
|
Karsten Hopp |
ef8d68 |
{
|
|
Karsten Hopp |
ef8d68 |
! copy_spaces(ptr, (size_t)spaces);
|
|
Karsten Hopp |
ef8d68 |
ptr += spaces;
|
|
Karsten Hopp |
ef8d68 |
}
|
|
Karsten Hopp |
ef8d68 |
}
|
|
Karsten Hopp |
ef8d68 |
/* may insert some spaces after the new text */
|
|
Karsten Hopp |
ef8d68 |
! copy_spaces(ptr, (size_t)bd.endspaces);
|
|
Karsten Hopp |
ef8d68 |
ptr += bd.endspaces;
|
|
Karsten Hopp |
ef8d68 |
/* move the text after the cursor to the end of the line. */
|
|
Karsten Hopp |
ef8d68 |
mch_memmove(ptr, oldp + bd.textcol + delcount,
|
|
Karsten Hopp |
ef8d68 |
--- 3701,3712 ----
|
|
Karsten Hopp |
ef8d68 |
/* insert block's trailing spaces only if there's text behind */
|
|
Karsten Hopp |
ef8d68 |
if ((j < count - 1 || !shortline) && spaces)
|
|
Karsten Hopp |
ef8d68 |
{
|
|
Karsten Hopp |
ef8d68 |
! vim_memset(ptr, ' ', (size_t)spaces);
|
|
Karsten Hopp |
ef8d68 |
ptr += spaces;
|
|
Karsten Hopp |
ef8d68 |
}
|
|
Karsten Hopp |
ef8d68 |
}
|
|
Karsten Hopp |
ef8d68 |
/* may insert some spaces after the new text */
|
|
Karsten Hopp |
ef8d68 |
! vim_memset(ptr, ' ', (size_t)bd.endspaces);
|
|
Karsten Hopp |
ef8d68 |
ptr += bd.endspaces;
|
|
Karsten Hopp |
ef8d68 |
/* move the text after the cursor to the end of the line. */
|
|
Karsten Hopp |
ef8d68 |
mch_memmove(ptr, oldp + bd.textcol + delcount,
|
|
Karsten Hopp |
ef8d68 |
***************
|
|
Karsten Hopp |
ef8d68 |
*** 4522,4528 ****
|
|
Karsten Hopp |
ef8d68 |
if (spaces[t] > 0)
|
|
Karsten Hopp |
ef8d68 |
{
|
|
Karsten Hopp |
ef8d68 |
cend -= spaces[t];
|
|
Karsten Hopp |
ef8d68 |
! copy_spaces(cend, (size_t)(spaces[t]));
|
|
Karsten Hopp |
ef8d68 |
}
|
|
Karsten Hopp |
ef8d68 |
mark_col_adjust(curwin->w_cursor.lnum + t, (colnr_T)0, (linenr_T)-t,
|
|
Karsten Hopp |
ef8d68 |
(long)(cend - newp + spaces[t] - (curr - curr_start)));
|
|
Karsten Hopp |
ef8d68 |
--- 4522,4528 ----
|
|
Karsten Hopp |
ef8d68 |
if (spaces[t] > 0)
|
|
Karsten Hopp |
ef8d68 |
{
|
|
Karsten Hopp |
ef8d68 |
cend -= spaces[t];
|
|
Karsten Hopp |
ef8d68 |
! vim_memset(cend, ' ', (size_t)(spaces[t]));
|
|
Karsten Hopp |
ef8d68 |
}
|
|
Karsten Hopp |
ef8d68 |
mark_col_adjust(curwin->w_cursor.lnum + t, (colnr_T)0, (linenr_T)-t,
|
|
Karsten Hopp |
ef8d68 |
(long)(cend - newp + spaces[t] - (curr - curr_start)));
|
|
Karsten Hopp |
ef8d68 |
*** ../vim-7.4.782/src/proto/misc2.pro 2014-08-10 13:34:59.064785459 +0200
|
|
Karsten Hopp |
ef8d68 |
--- src/proto/misc2.pro 2015-07-17 13:11:12.612078233 +0200
|
|
Karsten Hopp |
ef8d68 |
***************
|
|
Karsten Hopp |
ef8d68 |
*** 37,44 ****
|
|
Karsten Hopp |
ef8d68 |
char_u *vim_strnsave_up __ARGS((char_u *string, int len));
|
|
Karsten Hopp |
ef8d68 |
void vim_strup __ARGS((char_u *p));
|
|
Karsten Hopp |
ef8d68 |
char_u *strup_save __ARGS((char_u *orig));
|
|
Karsten Hopp |
ef8d68 |
- void copy_spaces __ARGS((char_u *ptr, size_t count));
|
|
Karsten Hopp |
ef8d68 |
- void copy_chars __ARGS((char_u *ptr, size_t count, int c));
|
|
Karsten Hopp |
ef8d68 |
void del_trailing_spaces __ARGS((char_u *ptr));
|
|
Karsten Hopp |
ef8d68 |
void vim_strncpy __ARGS((char_u *to, char_u *from, size_t len));
|
|
Karsten Hopp |
ef8d68 |
void vim_strcat __ARGS((char_u *to, char_u *from, size_t tosize));
|
|
Karsten Hopp |
ef8d68 |
--- 37,42 ----
|
|
Karsten Hopp |
ef8d68 |
*** ../vim-7.4.782/src/screen.c 2015-06-10 12:16:41.926648740 +0200
|
|
Karsten Hopp |
ef8d68 |
--- src/screen.c 2015-07-17 13:11:12.612078233 +0200
|
|
Karsten Hopp |
ef8d68 |
***************
|
|
Karsten Hopp |
ef8d68 |
*** 2833,2839 ****
|
|
Karsten Hopp |
ef8d68 |
int fdc = compute_foldcolumn(wp, 0);
|
|
Karsten Hopp |
ef8d68 |
|
|
Karsten Hopp |
ef8d68 |
/* Init to all spaces. */
|
|
Karsten Hopp |
ef8d68 |
! copy_spaces(p, (size_t)fdc);
|
|
Karsten Hopp |
ef8d68 |
|
|
Karsten Hopp |
ef8d68 |
level = win_foldinfo.fi_level;
|
|
Karsten Hopp |
ef8d68 |
if (level > 0)
|
|
Karsten Hopp |
ef8d68 |
--- 2833,2839 ----
|
|
Karsten Hopp |
ef8d68 |
int fdc = compute_foldcolumn(wp, 0);
|
|
Karsten Hopp |
ef8d68 |
|
|
Karsten Hopp |
ef8d68 |
/* Init to all spaces. */
|
|
Karsten Hopp |
ef8d68 |
! vim_memset(p, ' ', (size_t)fdc);
|
|
Karsten Hopp |
ef8d68 |
|
|
Karsten Hopp |
ef8d68 |
level = win_foldinfo.fi_level;
|
|
Karsten Hopp |
ef8d68 |
if (level > 0)
|
|
Karsten Hopp |
ef8d68 |
*** ../vim-7.4.782/src/version.c 2015-07-17 13:03:42.108357465 +0200
|
|
Karsten Hopp |
ef8d68 |
--- src/version.c 2015-07-17 13:06:43.742631736 +0200
|
|
Karsten Hopp |
ef8d68 |
***************
|
|
Karsten Hopp |
ef8d68 |
*** 743,744 ****
|
|
Karsten Hopp |
ef8d68 |
--- 743,746 ----
|
|
Karsten Hopp |
ef8d68 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
ef8d68 |
+ /**/
|
|
Karsten Hopp |
ef8d68 |
+ 783,
|
|
Karsten Hopp |
ef8d68 |
/**/
|
|
Karsten Hopp |
ef8d68 |
|
|
Karsten Hopp |
ef8d68 |
--
|
|
Karsten Hopp |
ef8d68 |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
ef8d68 |
228. You spend Saturday night making the counter on your home page
|
|
Karsten Hopp |
ef8d68 |
pass that 2000 mark.
|
|
Karsten Hopp |
ef8d68 |
|
|
Karsten Hopp |
ef8d68 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
ef8d68 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
ef8d68 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
ef8d68 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|