summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-09-16 21:55:43 +0000
committerBram Moolenaar <Bram@vim.org>2005-09-16 21:55:43 +0000
commit60a795aad6ade281146a5343b416f21825af5364 (patch)
treef38bf3d5e39bd321b2ff7b4d9bdf0367c8bec00b /src
parent6b730e111c329caccbb16f08c5b6bbc41d3b5690 (diff)
updated for version 7.0148v7.0148
Diffstat (limited to 'src')
-rw-r--r--src/ops.c13
-rw-r--r--src/screen.c2
-rw-r--r--src/search.c5
-rw-r--r--src/testdir/test58.ok14
-rw-r--r--src/testdir/test59.ok14
-rw-r--r--src/version.h4
6 files changed, 27 insertions, 25 deletions
diff --git a/src/ops.c b/src/ops.c
index b1b22a430c..dc0e52bc1b 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -2140,8 +2140,8 @@ op_tilde(oap)
pos_T pos;
#ifdef FEAT_VISUAL
struct block_def bd;
-#endif
int todo;
+#endif
int did_change = 0;
if (u_save((linenr_T)(oap->start.lnum - 1),
@@ -2158,10 +2158,10 @@ op_tilde(oap)
pos.col = bd.textcol;
for (todo = bd.textlen; todo > 0; --todo)
{
-#ifdef FEAT_MBYTE
+# ifdef FEAT_MBYTE
if (has_mbyte)
todo -= (*mb_ptr2len)(ml_get_pos(&pos)) - 1;
-#endif
+# endif
did_change |= swapchar(oap->op_type, &pos);
if (inc(&pos) == -1) /* at end of file */
break;
@@ -2195,16 +2195,13 @@ op_tilde(oap)
else if (!oap->inclusive)
dec(&(oap->end));
- for (todo = oap->end.col - pos.col + 1; todo > 0; --todo)
+ while (ltoreq(pos, oap->end))
{
-#ifdef FEAT_MBYTE
- if (has_mbyte)
- todo -= (*mb_ptr2len)(ml_get_pos(&pos)) - 1;
-#endif
did_change |= swapchar(oap->op_type, &pos);
if (inc(&pos) == -1) /* at end of file */
break;
}
+
if (did_change)
{
changed_lines(oap->start.lnum, oap->start.col, oap->end.lnum + 1,
diff --git a/src/screen.c b/src/screen.c
index 6e2547188b..f497f370de 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -2931,7 +2931,7 @@ win_line(wp, lnum, startrow, endrow)
wp->w_cursor.lnum = lnum;
wp->w_cursor.col = ptr - line;
len = spell_move_to(wp, FORWARD, TRUE, TRUE, &spell_attr);
- if (len == 0 || wp->w_cursor.col > ptr - line)
+ if (len == 0 || (int)wp->w_cursor.col > ptr - line)
{
/* no bad word found at line start, don't check until end of a
* word */
diff --git a/src/search.c b/src/search.c
index 456b694268..2ed15df2b2 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1440,6 +1440,11 @@ searchc(cap, t_cmd)
/* For multi-byte re-use last bytes[] and bytelen. */
}
+ if (dir == BACKWARD)
+ cap->oap->inclusive = FALSE;
+ else
+ cap->oap->inclusive = TRUE;
+
p = ml_get_curline();
col = curwin->w_cursor.col;
len = (int)STRLEN(p);
diff --git a/src/testdir/test58.ok b/src/testdir/test58.ok
index 9fba6bc0ae..736e9929cd 100644
--- a/src/testdir/test58.ok
+++ b/src/testdir/test58.ok
@@ -34,7 +34,7 @@ test
déôl
['deol', 'déôr', 'test']
end
-['put', 'test', 'uk']
+['put', 'OK', 'test']
the
['put', 'uk', 'test']
gebletegek
@@ -75,7 +75,7 @@ wrong
bad
['put', 'uk', 'OK']
inputs
-['input', 'puts', 'put']
+['input', 'puts', 'outputs']
comment
['Comment']
ok
@@ -143,7 +143,7 @@ wordutilize
pro
['bork', 'end', 'word']
borkborkborkborkborkbork
-['borkbork borkborkborkbork', 'borkborkbork borkborkbork', 'borkborkborkborkbork bork']
+['bork borkborkborkborkbork', 'borkbork borkborkborkbork', 'borkborkbork borkborkbork']
tomatotomatotomato
['tomato tomatotomato', 'tomatotomato tomato', 'tomato tomato tomato']
endstart
@@ -153,13 +153,13 @@ endend
startstart
['start start']
wordend
-['word end', 'wordword', 'word']
+['word end', 'word', 'wordword']
wordstart
['word start', 'bork start']
startwordwordwordwordend
['startwordwordwordword end', 'startwordwordwordword', 'start wordwordwordword end']
borkpreborkpreborkbork
-['borkpreborkprebork bork', 'borkprebork preborkbork', 'bork preborkpreborkbork']
+['bork preborkpreborkbork', 'borkprebork preborkbork', 'borkpreborkprebork bork']
test 5-5
# file: Xtest.latin1.spl
@@ -211,7 +211,7 @@ mee
meea2
['meea1', 'meeaé', 'lead']
prabar
-['prebar', 'leadbar', 'bar']
+['prebar', 'bar', 'leadbar']
probarbirk
['prebarbork']
middle
@@ -243,7 +243,7 @@ mee
meea2
['meea1', 'meeaé', 'lead']
prabar
-['prebar', 'leadbar', 'bar']
+['prebar', 'bar', 'leadbar']
probarmaat
['prebarmeat']
middle
diff --git a/src/testdir/test59.ok b/src/testdir/test59.ok
index c37ecb8628..8f476677e2 100644
--- a/src/testdir/test59.ok
+++ b/src/testdir/test59.ok
@@ -34,7 +34,7 @@ test
déôl
['deol', 'déôr', 'test']
end
-['put', 'test', 'uk']
+['put', 'OK', 'test']
the
['put', 'uk', 'test']
gebletegek
@@ -75,7 +75,7 @@ wrong
bad
['put', 'uk', 'OK']
inputs
-['input', 'puts', 'put']
+['input', 'puts', 'outputs']
comment
['Comment']
ok
@@ -143,7 +143,7 @@ wordutilize
pro
['bork', 'end', 'word']
borkborkborkborkborkbork
-['borkbork borkborkborkbork', 'borkborkbork borkborkbork', 'borkborkborkborkbork bork']
+['bork borkborkborkborkbork', 'borkbork borkborkborkbork', 'borkborkbork borkborkbork']
tomatotomatotomato
['tomato tomatotomato', 'tomatotomato tomato', 'tomato tomato tomato']
endstart
@@ -153,13 +153,13 @@ endend
startstart
['start start']
wordend
-['word end', 'wordword', 'word']
+['word end', 'word', 'wordword']
wordstart
['word start', 'bork start']
startwordwordwordwordend
['startwordwordwordword end', 'startwordwordwordword', 'start wordwordwordword end']
borkpreborkpreborkbork
-['borkpreborkprebork bork', 'borkprebork preborkbork', 'bork preborkpreborkbork']
+['bork preborkpreborkbork', 'borkprebork preborkbork', 'borkpreborkprebork bork']
test 5-5
# file: Xtest.utf-8.spl
@@ -211,7 +211,7 @@ mee
meea2
['meea1', 'meeaé', 'lead']
prabar
-['prebar', 'leadbar', 'bar']
+['prebar', 'bar', 'leadbar']
probarbirk
['prebarbork']
middle
@@ -243,7 +243,7 @@ mee
meea2
['meea1', 'meeaé', 'lead']
prabar
-['prebar', 'leadbar', 'bar']
+['prebar', 'bar', 'leadbar']
probarmaat
['prebarmeat']
middle
diff --git a/src/version.h b/src/version.h
index 9402b51ea3..f4c9e71325 100644
--- a/src/version.h
+++ b/src/version.h
@@ -36,5 +36,5 @@
#define VIM_VERSION_NODOT "vim70aa"
#define VIM_VERSION_SHORT "7.0aa"
#define VIM_VERSION_MEDIUM "7.0aa ALPHA"
-#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Sep 14)"
-#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Sep 14, compiled "
+#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Sep 16)"
+#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Sep 16, compiled "