1
0
forked from aniani/vim

updated for version 7.0135

This commit is contained in:
Bram Moolenaar
2005-08-23 21:02:42 +00:00
parent 7862282f2e
commit 6f16eb817b
8 changed files with 155 additions and 51 deletions

View File

@@ -688,6 +688,7 @@ EXTERN int enc_dbcs INIT(= 0); /* One of DBCS_xxx values if
DBCS encoding */
EXTERN int enc_unicode INIT(= 0); /* 2: UCS-2 or UTF-16, 4: UCS-4 */
EXTERN int enc_utf8 INIT(= FALSE); /* UTF-8 encoded Unicode */
EXTERN int enc_latin1like INIT(= TRUE); /* 'encoding' is latin1 comp. */
# ifdef WIN3264
/* Codepage nr of 'encoding'. Negative means it's not been set yet, zero
* means 'encoding' is not a valid codepage. */

View File

@@ -2140,12 +2140,9 @@ op_tilde(oap)
pos_T pos;
#ifdef FEAT_VISUAL
struct block_def bd;
int done;
#endif
int todo;
int did_change = 0;
#ifdef FEAT_MBYTE
colnr_T col;
#endif
if (u_save((linenr_T)(oap->start.lnum - 1),
(linenr_T)(oap->end.lnum + 1)) == FAIL)
@@ -2159,19 +2156,15 @@ op_tilde(oap)
{
block_prep(oap, &bd, pos.lnum, FALSE);
pos.col = bd.textcol;
for (done = 0; done < bd.textlen; ++done)
for (todo = bd.textlen; todo > 0; --todo)
{
#ifdef FEAT_MBYTE
if (has_mbyte)
todo -= (*mb_ptr2len)(ml_get_pos(&pos)) - 1;
#endif
did_change |= swapchar(oap->op_type, &pos);
# ifdef FEAT_MBYTE
col = pos.col + 1;
# endif
if (inc(&pos) == -1) /* at end of file */
break;
# ifdef FEAT_MBYTE
if (pos.col > col)
/* Count extra bytes of a multi-byte character. */
done += pos.col - col;
# endif
}
# ifdef FEAT_NETBEANS_INTG
if (usingNetbeans && did_change)
@@ -2202,8 +2195,12 @@ op_tilde(oap)
else if (!oap->inclusive)
dec(&(oap->end));
while (ltoreq(pos, oap->end))
for (todo = oap->end.col - pos.col + 1; todo > 0; --todo)
{
#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;
@@ -2282,6 +2279,19 @@ swapchar(op_type, pos)
return FALSE;
#ifdef FEAT_MBYTE
if (op_type == OP_UPPER && enc_latin1like && c == 0xdf)
{
pos_T sp = curwin->w_cursor;
/* Special handling of German sharp s: change to "SS". */
curwin->w_cursor = *pos;
del_char(FALSE);
ins_char('S');
ins_char('S');
curwin->w_cursor = sp;
inc(pos);
}
if (enc_dbcs != 0 && c >= 0x100) /* No lower/uppercase letter */
return FALSE;
#endif

View File

@@ -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 Aug 23)"
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Aug 23, compiled "
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Aug 24)"
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Aug 24, compiled "