summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvimboss <devnull@localhost>2005-08-24 22:16:11 +0000
committervimboss <devnull@localhost>2005-08-24 22:16:11 +0000
commitbea3e5e2da116cbfe1a86e2f856ef2c9c522f8a4 (patch)
tree47bf7d7944d912a5ea62ba22a81636f419bec45a /src
parentec4071404b2465e52b11479d415d7d825b229912 (diff)
downloadvim-7-0136.tar.gz
updated for version 7.0136v7.0136v7-0136
Diffstat (limited to 'src')
-rw-r--r--src/charset.c6
-rw-r--r--src/edit.c10
-rw-r--r--src/eval.c14
-rw-r--r--src/gui_gtk_x11.c12
-rw-r--r--src/version.h4
5 files changed, 27 insertions, 19 deletions
diff --git a/src/charset.c b/src/charset.c
index c769486c..19f202ac 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -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{|}~";
-static char_u latin1lower[256] = " !\"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
+static char_u latin1flags[257] = " UUUUUUUUUUUUUUUUUUUUUUUUUU llllllllllllllllllllllllll UUUUUUUUUUUUUUUUUUUUUUU UUUUUUUllllllllllllllllllllllll llllllll";
+static char_u latin1upper[257] = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~";
+static char_u latin1lower[257] = " !\"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
int
vim_islower(c)
diff --git a/src/edit.c b/src/edit.c
index 96ebe717..b31177c5 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -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);
}
diff --git a/src/eval.c b/src/eval.c
index a7fc6b31..c9345538 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -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
}
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index da680d0c..1502e0c1 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -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" */
diff --git a/src/version.h b/src/version.h
index 8c6465e2..f1ce02bc 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 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 "