summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvimboss <devnull@localhost>2008-07-24 19:31:11 +0000
committervimboss <devnull@localhost>2008-07-24 19:31:11 +0000
commit42dc2c7c8642152242756e372c42215fe99e5232 (patch)
tree7c77a668be17428ccd3a7f4f738f322a429a7555
parent9602496e03c8cece16b58ac0fdceefb24c23fca4 (diff)
downloadvim-42dc2c7c8642152242756e372c42215fe99e5232.tar.gz
updated for version 7.2b-020v7.2b.020v7-2b-020
-rw-r--r--src/charset.c30
-rw-r--r--src/ex_cmds.c7
-rw-r--r--src/version.c2
3 files changed, 27 insertions, 12 deletions
diff --git a/src/charset.c b/src/charset.c
index 0c9c5113..0f4b0b99 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -1466,9 +1466,11 @@ getvcols(wp, pos1, pos2, left, right)
* skipwhite: skip over ' ' and '\t'.
*/
char_u *
-skipwhite(p)
- char_u *p;
+skipwhite(q)
+ char_u *q;
{
+ char_u *p = q;
+
while (vim_iswhite(*p)) /* skip to next non-white */
++p;
return p;
@@ -1478,9 +1480,11 @@ skipwhite(p)
* skip over digits
*/
char_u *
-skipdigits(p)
- char_u *p;
+skipdigits(q)
+ char_u *q;
{
+ char_u *p = q;
+
while (VIM_ISDIGIT(*p)) /* skip to next non-digit */
++p;
return p;
@@ -1491,9 +1495,11 @@ skipdigits(p)
* skip over digits and hex characters
*/
char_u *
-skiphex(p)
- char_u *p;
+skiphex(q)
+ char_u *q;
{
+ char_u *p = q;
+
while (vim_isxdigit(*p)) /* skip to next non-digit */
++p;
return p;
@@ -1505,9 +1511,11 @@ skiphex(p)
* skip to digit (or NUL after the string)
*/
char_u *
-skiptodigit(p)
- char_u *p;
+skiptodigit(q)
+ char_u *q;
{
+ char_u *p = q;
+
while (*p != NUL && !VIM_ISDIGIT(*p)) /* skip to next digit */
++p;
return p;
@@ -1517,9 +1525,11 @@ skiptodigit(p)
* skip to hex character (or NUL after the string)
*/
char_u *
-skiptohex(p)
- char_u *p;
+skiptohex(q)
+ char_u *q;
{
+ char_u *p = q;
+
while (*p != NUL && !vim_isxdigit(*p)) /* skip to next digit */
++p;
return p;
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 0f8af051..d700cc53 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -479,10 +479,13 @@ ex_sort(eap)
c = *s2;
(*s2) = 0;
/* Sorting on number: Store the number itself. */
+ p = s + start_col;
if (sort_hex)
- s = skiptohex(s + start_col);
+ s = skiptohex(p);
else
- s = skiptodigit(s + start_col);
+ s = skiptodigit(p);
+ if (s > p && s[-1] == '-')
+ --s; /* include preceding negative sign */
vim_str2nr(s, NULL, NULL, sort_oct, sort_hex,
&nrs[lnum - eap->line1].start_col_nr, NULL);
(*s2) = c;
diff --git a/src/version.c b/src/version.c
index d44083af..99b85656 100644
--- a/src/version.c
+++ b/src/version.c
@@ -677,6 +677,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 20,
+/**/
19,
/**/
18,