diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ops.c | 13 | ||||
-rw-r--r-- | src/screen.c | 2 | ||||
-rw-r--r-- | src/search.c | 5 | ||||
-rw-r--r-- | src/testdir/test58.ok | 14 | ||||
-rw-r--r-- | src/testdir/test59.ok | 14 | ||||
-rw-r--r-- | src/version.h | 4 |
6 files changed, 27 insertions, 25 deletions
@@ -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 6e2547188..f497f370d 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 456b69426..2ed15df2b 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 9fba6bc0a..736e9929c 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 c37ecb862..8f476677e 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 9402b51ea..f4c9e7132 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 " |