summaryrefslogtreecommitdiff
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
parentec4071404b2465e52b11479d415d7d825b229912 (diff)
downloadvim-7-0136.tar.gz
updated for version 7.0136v7.0136v7-0136
-rw-r--r--runtime/doc/filetype.txt4
-rw-r--r--runtime/doc/spell.txt43
-rw-r--r--runtime/doc/tags35
-rw-r--r--runtime/doc/todo.txt18
-rw-r--r--runtime/doc/version7.txt5
-rw-r--r--runtime/filetype.vim8
-rw-r--r--runtime/syntax/eruby.vim62
-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
12 files changed, 162 insertions, 59 deletions
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt
index 8b7d6ac4..cb8ff412 100644
--- a/runtime/doc/filetype.txt
+++ b/runtime/doc/filetype.txt
@@ -1,4 +1,4 @@
-*filetype.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
+*filetype.txt* For Vim version 7.0aa. Last change: 2005 Aug 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -401,7 +401,7 @@ Local mappings:
Global mappings:
NOTE: The global mappings are accessed by sourcing the
ftplugin/changelog.vim file first, e.g. with >
- runtime ftplugin/man.vim
+ runtime ftplugin/changelog.vim
< in your |.vimrc|.
<Leader>o Switches to the ChangeLog buffer opened for the
current directory, or opens it in a new buffer if it
diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt
index 2a859a9d..291a3d36 100644
--- a/runtime/doc/spell.txt
+++ b/runtime/doc/spell.txt
@@ -1,4 +1,4 @@
-*spell.txt* For Vim version 7.0aa. Last change: 2005 Aug 23
+*spell.txt* For Vim version 7.0aa. Last change: 2005 Aug 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -645,7 +645,11 @@ The first line contains the number of words. Vim ignores it, but you do get
an error message if it's not there. *E760*
What follows is one word per line. There should be no white space before or
-after the word.
+after the word. After the word there is an optional slash and flags. Most of
+these flags are letters that indicate the affixes that can be used with this
+word. These are specified with SFX and PFX lines in the .aff file. See the
+Myspell documentation. Vim allows using other flag types with the FLAG item
+in the affix file |spell-FLAG|.
When the word only has lower-case letters it will also match with the word
starting with an upper-case letter.
@@ -671,11 +675,6 @@ any character in a word. When checking the text a word still only matches
when it appears with a non-word character before and after it. For Myspell a
word starting with a non-word character probably won't work.
-After the word there is an optional slash and flags. Most of these flags are
-letters that indicate the affixes that can be used with this word. These are
-specified with SFX and PFX lines in the .aff file. See the Myspell
-documentation.
-
In line 12 the word "TCP/IP" is defined. Since the slash has a special
meaning the comma is used instead. This is defined with the SLASH item in the
affix file, see |spell-SLASH|. Note that without this SLASH item the
@@ -767,6 +766,29 @@ These characters are defined with MIDWORD in the .aff file:
MIDWORD '- ~
+FLAG TYPES *spell-FLAG*
+
+Flags are used to specify the affixes that can be used with a word and for
+other properties of the word. Normally single-character flags are used. This
+limits the number of possible flags, especially for 8-bit encodings. The FLAG
+item can be used if more affixes are to be used. Possible values:
+
+ FLAG long use two-character flags
+ FLAG num use numbers, from 1 up to 65000
+ FLAG huh use one-character flags without A-Z and two-character
+ flags that start with A-Z
+
+With "FLAG num" the numbers in a list of affixes need to be separated with a
+comma: "234,2143,1435". This method is inefficient, but useful if the file is
+generated with a program.
+
+When using "huh" the two-character flags all start with a capital: "Aa", "B1",
+"BB", etc. This is useful to use one-character flags for the most common
+items and two-character flags for uncommon items.
+
+Note: When using utf-8 only characters up to 65000 may be used for flags.
+
+
AFFIXES
*spell-PFX* *spell-SFX*
The usual PFX (prefix) and SFX (suffix) lines are supported (see the Myspell
@@ -1065,7 +1087,9 @@ used to make spelling suggestions. The items define the "from" text and the
REP k ch ~
REP ch k ~
-The first line specifies the number of REP lines following. Vim ignores it.
+The first line specifies the number of REP lines following. Vim ignores the
+number, but it must be there.
+
Don't include simple one-character replacements or swaps. Vim will try these
anyway. You can include whole words if you want to, but you might want to use
the "file:" item in 'spellsuggest' instead.
@@ -1081,7 +1105,8 @@ to prefer suggestions with these letters substituted. Example:
MAP e ~
MAP u ~
-The first line specifies the number of MAP lines following. Vim ignores it.
+The first line specifies the number of MAP lines following. Vim ignores the
+number, but the line must be there.
Each letter must appear in only one of the MAP items. It's a bit more
efficient if the first letter is ASCII or at least one without accents.
diff --git a/runtime/doc/tags b/runtime/doc/tags
index f18ce242..74d177dd 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -6389,35 +6389,36 @@ spec_chglog_release_info pi_spec.txt /*spec_chglog_release_info*
special-buffers windows.txt /*special-buffers*
speed-up tips.txt /*speed-up*
spell spell.txt /*spell*
+spell-BAD spell.txt /*spell-BAD*
spell-CMP spell.txt /*spell-CMP*
spell-COMPOUNDFLAG spell.txt /*spell-COMPOUNDFLAG*
spell-COMPOUNDFLAGS spell.txt /*spell-COMPOUNDFLAGS*
spell-COMPOUNDMAX spell.txt /*spell-COMPOUNDMAX*
spell-COMPOUNDMIN spell.txt /*spell-COMPOUNDMIN*
spell-COMPOUNDSYLMAX spell.txt /*spell-COMPOUNDSYLMAX*
+spell-FOL spell.txt /*spell-FOL*
+spell-KEP spell.txt /*spell-KEP*
+spell-LOW spell.txt /*spell-LOW*
+spell-MAP spell.txt /*spell-MAP*
+spell-NEEDAFFIX spell.txt /*spell-NEEDAFFIX*
+spell-NOBREAK spell.txt /*spell-NOBREAK*
+spell-PFX spell.txt /*spell-PFX*
+spell-PFXPOSTPONE spell.txt /*spell-PFXPOSTPONE*
+spell-RAR spell.txt /*spell-RAR*
+spell-REP spell.txt /*spell-REP*
+spell-SAL spell.txt /*spell-SAL*
+spell-SFX spell.txt /*spell-SFX*
+spell-SLASH spell.txt /*spell-SLASH*
+spell-SOFOFROM spell.txt /*spell-SOFOFROM*
+spell-SOFOTO spell.txt /*spell-SOFOTO*
spell-SYLLABLE spell.txt /*spell-SYLLABLE*
-spell-affix-BAD spell.txt /*spell-affix-BAD*
-spell-affix-FOL spell.txt /*spell-affix-FOL*
-spell-affix-KEP spell.txt /*spell-affix-KEP*
-spell-affix-LOW spell.txt /*spell-affix-LOW*
-spell-affix-MAP spell.txt /*spell-affix-MAP*
-spell-affix-NEEDAFFIX spell.txt /*spell-affix-NEEDAFFIX*
-spell-affix-PFX spell.txt /*spell-affix-PFX*
-spell-affix-PFXPOSTPONE spell.txt /*spell-affix-PFXPOSTPONE*
-spell-affix-RAR spell.txt /*spell-affix-RAR*
-spell-affix-REP spell.txt /*spell-affix-REP*
-spell-affix-SAL spell.txt /*spell-affix-SAL*
-spell-affix-SFX spell.txt /*spell-affix-SFX*
-spell-affix-SLASH spell.txt /*spell-affix-SLASH*
-spell-affix-SOFOFROM spell.txt /*spell-affix-SOFOFROM*
-spell-affix-SOFOTO spell.txt /*spell-affix-SOFOTO*
-spell-affix-UPP spell.txt /*spell-affix-UPP*
+spell-UPP spell.txt /*spell-UPP*
spell-affix-chars spell.txt /*spell-affix-chars*
-spell-affix-compound spell.txt /*spell-affix-compound*
spell-affix-mbyte spell.txt /*spell-affix-mbyte*
spell-affix-nocomp spell.txt /*spell-affix-nocomp*
spell-affix-rare spell.txt /*spell-affix-rare*
spell-affix-vim spell.txt /*spell-affix-vim*
+spell-compound spell.txt /*spell-compound*
spell-dic-format spell.txt /*spell-dic-format*
spell-double-scoring spell.txt /*spell-double-scoring*
spell-file-format spell.txt /*spell-file-format*
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 10d08c75..21d7926f 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.0aa. Last change: 2005 Aug 23
+*todo.txt* For Vim version 7.0aa. Last change: 2005 Aug 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -31,13 +31,12 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
-------------------- Known bugs and current work -----------------------
Spelling:
-- Support flags of two characters, numbers (comma separated) and HUH
- flags: [^A-Z], A[^A-Z], ..., Z[^A-Z]?
- FLAG long
- FLAG num
- FLAG mix
- Problem: room in idxs[]. Need to translate flags for postponed prefixes and
- compound words, these can only be 255.
+- Bug: with 'nowrap' spell checking may start halfway a word.
+
+- Use 'wrapscan' for "[s" and "]s"?
+
+- Check support of flags of two characters, numbers (comma separated) and HUH.
+ When using many compound flags, does regexp still work?
- Compound word is accepted if nr of words is <= COMPOUNDMAX OR nr of
syllables <= COMPOUNDSYLMAX. Specify AND in the affix file?
@@ -521,6 +520,9 @@ GTK+ GUI known bugs:
8 GTK 2: Combining UTF-8 characters not displayed properly in menus (Mikolaj
Machowski) They are displayed as separate characters. Problem in
creating a label?
+8 GTK 2: Combining UTF-8 characters are sometimes not drawn properly.
+ Depends on the font size, "monospace 13" has the problem. Vim seems to do
+ everything right, must be a GTK bug. Is there a way to work around it?
9 Can't paste a Visual selection from GTK-gvim to vim in xterm or Motif gvim
when it is longer than 4000 characters. Works OK from gvim to gvim and
vim to vim. Pasting through xterm (using the shift key) also works.
diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt
index cfc1b15a..f1159e61 100644
--- a/runtime/doc/version7.txt
+++ b/runtime/doc/version7.txt
@@ -1,4 +1,4 @@
-*version7.txt* For Vim version 7.0aa. Last change: 2005 Aug 23
+*version7.txt* For Vim version 7.0aa. Last change: 2005 Aug 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1304,4 +1304,7 @@ in an error message while redrawing, which cleared the syntax highlighting
while it was being used, resulting in a crash. Now don't clear syntax
highlighting, disable it with b_syn_error.
+Win32: Combining UTF-8 characters were drawn on the previous character.
+Could be noticed with a Thai font.
+
vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 5172322c..55cd02d3 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2005 Aug 17
+" Last Change: 2005 Aug 24
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -629,8 +629,8 @@ au BufNewFile,BufRead *.hex,*.h32 setf hex
" Tilde (must be before HTML)
au BufNewFile,BufRead *.t.html setf tilde
-" HTML (.shtml and .stm for server side, .rhtml for Ruby html)
-au BufNewFile,BufRead *.html,*.htm,*.shtml,*.rhtml,*.stm call s:FThtml()
+" HTML (.shtml and .stm for server side)
+au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call s:FThtml()
" Distinguish between HTML and XHTML
fun! s:FThtml()
@@ -645,6 +645,8 @@ fun! s:FThtml()
setf html
endfun
+" HTML with Ruby - eRuby
+au BufNewFile,BufRead *.rhtml setf eruby
" HTML with M4
au BufNewFile,BufRead *.html.m4 setf htmlm4
diff --git a/runtime/syntax/eruby.vim b/runtime/syntax/eruby.vim
new file mode 100644
index 00000000..85b3cfb2
--- /dev/null
+++ b/runtime/syntax/eruby.vim
@@ -0,0 +1,62 @@
+" Vim syntax file
+" Language: eRuby
+" Maintainer: Doug Kearns <djkea2 at gus.gscit.monash.edu.au>
+" Info: $Id$
+" URL: http://vim-ruby.sourceforge.net
+" Anon CVS: See above site
+" Licence: GPL (http://www.gnu.org)
+" Disclaimer:
+" This program is distributed in the hope that it will be useful,
+" but WITHOUT ANY WARRANTY; without even the implied warranty of
+" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+" GNU General Public License for more details.
+" ----------------------------------------------------------------------------
+
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+if !exists("main_syntax")
+ let main_syntax = 'eruby'
+endif
+
+if version < 600
+ so <sfile>:p:h/html.vim
+ syn include @rubyTop <sfile>:p:h/ruby.vim
+else
+ runtime! syntax/html.vim
+ unlet b:current_syntax
+ syn include @rubyTop syntax/ruby.vim
+endif
+
+syn region erubyOneLiner matchgroup=erubyDelimiter start="^\s*\zs%" end="$" contains=@rubyTop,erubyDelimiter keepend
+syn region erubyBlock matchgroup=erubyDelimiter start="<%=\=" end="%>" contains=@rubyTop containedin=ALLBUT,erubyComment keepend
+syn region erubyComment matchgroup=erubyDelimiter start="<%#" end="%>" keepend
+
+" Define the default highlighting.
+" For version 5.7 and earlier: only when not done already
+" For version 5.8 and later: only when an item doesn't have highlighting yet
+if version >= 508 || !exists("did_eruby_syntax_inits")
+ if version < 508
+ let did_ruby_syntax_inits = 1
+ command -nargs=+ HiLink hi link <args>
+ else
+ command -nargs=+ HiLink hi def link <args>
+ endif
+
+ HiLink erubyDelimiter Delimiter
+ HiLink erubyComment Comment
+
+ delcommand HiLink
+endif
+let b:current_syntax = "eruby"
+
+if main_syntax == 'eruby'
+ unlet main_syntax
+endif
+
+" vim: sw=2 sts=2 ts=8 ff=unix nowrap:
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 "