1
0
forked from aniani/vim

updated for version 7.0136

This commit is contained in:
Bram Moolenaar
2005-08-24 22:16:11 +00:00
parent 5bcb2eba3d
commit 6e7c7f3a19
12 changed files with 162 additions and 59 deletions

View File

@@ -1542,9 +1542,9 @@ vim_isxdigit(c)
#define LATIN1UPPER 'U'
/* !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]%_'abcdefghijklmnopqrstuvwxyz{|}~ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ */
static char_u latin1flags[256] = " UUUUUUUUUUUUUUUUUUUUUUUUUU llllllllllllllllllllllllll UUUUUUUUUUUUUUUUUUUUUUU UUUUUUUllllllllllllllllllllllll llllllll";
static char_u latin1upper[256] = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~<7F>ƒ„…†‡ˆ‰ŠŒ<E280B9>Ž<EFBFBD><C5BD>“”•˜™šœ<E280BA>žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ÷ØÙÚÛÜÝÞÿ";
static char_u latin1lower[256] = " !\"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~<7F>ƒ„…†‡ˆ‰ŠŒ<E280B9>Ž<EFBFBD><C5BD>“”•˜™šœ<E280BA>žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿àáâãäåæçèéêëìíîïðñòóôõö×øùúûüýþßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ";
static char_u latin1flags[257] = " UUUUUUUUUUUUUUUUUUUUUUUUUU llllllllllllllllllllllllll UUUUUUUUUUUUUUUUUUUUUUU UUUUUUUllllllllllllllllllllllll llllllll";
static char_u latin1upper[257] = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~<7F>ƒ„…†‡ˆ‰ŠŒ<E280B9>Ž<EFBFBD><C5BD>“”•˜™šœ<E280BA>žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ÷ØÙÚÛÜÝÞÿ";
static char_u latin1lower[257] = " !\"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~<7F>ƒ„…†‡ˆ‰ŠŒ<E280B9>Ž<EFBFBD><C5BD>“”•˜™šœ<E280BA>žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿àáâãäåæçèéêëìíîïðñòóôõö×øùúûüýþßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ";
int
vim_islower(c)

View File

@@ -137,6 +137,7 @@ static void start_arrow __ARGS((pos_T *end_insert_pos));
#ifdef FEAT_SYN_HL
static void check_spell_redraw __ARGS((void));
static void spell_back_to_badword __ARGS((void));
static int spell_bad_len = 0; /* length of located bad word */
#endif
static void stop_insert __ARGS((pos_T *end_insert_pos, int esc));
static int echeck_abbr __ARGS((int));
@@ -3536,8 +3537,11 @@ ins_complete(c)
else if (ctrl_x_mode == CTRL_X_SPELL)
{
#ifdef FEAT_SYN_HL
compl_col = spell_word_start(startcol);
if (compl_col == (colnr_T)startcol)
if (spell_bad_len > 0)
compl_col = curs_col - spell_bad_len;
else
compl_col = spell_word_start(startcol);
if (compl_col >= (colnr_T)startcol)
return FAIL;
compl_length = (int)curs_col - compl_col;
compl_pattern = vim_strnsave(line + compl_col, compl_length);
@@ -4806,7 +4810,7 @@ spell_back_to_badword()
{
pos_T tpos = curwin->w_cursor;
spell_move_to(BACKWARD, TRUE, TRUE);
spell_bad_len = spell_move_to(BACKWARD, TRUE, TRUE);
if (curwin->w_cursor.col != tpos.col)
start_arrow(&tpos);
}

View File

@@ -13749,22 +13749,16 @@ f_spellbadword(argvars, rettv)
typval_T *argvars;
typval_T *rettv;
{
int attr;
char_u *ptr;
int len;
rettv->vval.v_string = NULL;
rettv->v_type = VAR_STRING;
#ifdef FEAT_SYN_HL
/* Find the start of the badly spelled word. */
if (spell_move_to(FORWARD, TRUE, TRUE) == FAIL)
return;
/* Get the length of the word and copy it. */
ptr = ml_get_cursor();
len = spell_check(curwin, ptr, &attr, NULL);
rettv->vval.v_string = vim_strnsave(ptr, len);
/* Find the start and length of the badly spelled word. */
len = spell_move_to(FORWARD, TRUE, TRUE);
if (len != 0)
rettv->vval.v_string = vim_strnsave(ml_get_cursor(), len);
#endif
}

View File

@@ -5328,6 +5328,9 @@ not_ascii:
int cluster_width;
int last_glyph_rbearing;
int cells = 0; /* cells occupied by current cluster */
#if 0
int monospace13 = STRICMP(p_guifont, "monospace 13") == 0;
#endif
/* Safety check: pango crashes when invoked with invalid utf-8
* characters. */
@@ -5446,10 +5449,17 @@ not_ascii:
* characters the canonical way. That is, setting the
* width of the previous glyph to 0. */
glyphs->glyphs[i - 1].geometry.width = 0;
width = cells * gui.char_width * PANGO_SCALE;
glyph->geometry.x_offset +=
MAX(0, width - cluster_width) / 2;
#if 0
/* Dirty hack: for "monospace 13" font there is a bug that
* draws composing chars in the wrong position. Add
* "width" to the offset to work around that. */
if (monospace13)
glyph->geometry.x_offset = width;
#endif
glyph->geometry.width = width;
}
else /* i == 0 "cannot happen" */

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