summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/autocmd.txt11
-rw-r--r--runtime/doc/options.txt8
-rw-r--r--runtime/doc/quickref.txt3
-rw-r--r--runtime/doc/spell.txt19
-rw-r--r--runtime/doc/tags1
-rw-r--r--runtime/doc/term.txt4
-rw-r--r--runtime/doc/todo.txt19
-rw-r--r--runtime/doc/various.txt13
-rw-r--r--runtime/doc/version7.txt13
-rw-r--r--runtime/filetype.vim8
-rw-r--r--runtime/optwin.vim4
-rw-r--r--runtime/spell/bg/main.aap6
-rw-r--r--runtime/spell/main.aap3
-rw-r--r--runtime/spell/ru/main.aap104
-rw-r--r--runtime/spell/ru/ru_RU.diff32
-rw-r--r--runtime/spell/ru/ru_YO.diff14
-rw-r--r--src/eval.c3
-rw-r--r--src/feature.h3
-rw-r--r--src/fileio.c4
-rw-r--r--src/if_xcmdsrv.c16
-rw-r--r--src/mbyte.c28
-rw-r--r--src/misc2.c5
-rw-r--r--src/option.c22
-rw-r--r--src/proto/mbyte.pro1
-rw-r--r--src/spell.c306
-rw-r--r--src/testdir/test58.in247
-rw-r--r--src/testdir/test58.ok89
-rw-r--r--src/testdir/test59.in225
-rw-r--r--src/testdir/test59.ok122
-rw-r--r--src/version.h4
30 files changed, 955 insertions, 382 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 5a9c360402..f2b2051b0a 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -155,6 +155,17 @@ argument behavior differs from that for defining and removing autocommands.
In order to list buffer-local autocommands, use a pattern in the form <buffer>
or <buffer=N>. See |autocmd-buflocal|.
+ *:autocmd-verbose*
+When 'verbose' is non-zero, listing an autocommand will also display where it
+was last defined. Example: >
+
+ :verbose autocmd BufEnter
+ FileExplorer BufEnter
+ * call s:LocalBrowse(expand("<amatch>"))
+ Last set from /usr/share/vim/vim-7.0/plugin/NetrwPlugin.vim
+<
+See |:verbose-cmd| for more information.
+
==============================================================================
5. Events *autocmd-events* *E215* *E216*
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 6a3e697202..eb5a34a4da 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 7.0aa. Last change: 2005 Aug 23
+*options.txt* For Vim version 7.0aa. Last change: 2005 Aug 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1100,7 +1100,8 @@ A jump table for the options with a short description can be found at |Q_op|.
{not available when compiled without the |+linebreak|
feature}
This option lets you choose which characters might cause a line
- break if 'linebreak' is on.
+ break if 'linebreak' is on. Only works for ASCII and also for 8-bit
+ characters when 'encoding' is an 8-bit encoding.
*'browsedir'* *'bsdir'*
'browsedir' 'bsdir' string (default: "last")
@@ -7282,7 +7283,8 @@ A jump table for the options with a short description can be found at |Q_op|.
*'wrapscan'* *'ws'* *'nowrapscan'* *'nows'*
'wrapscan' 'ws' boolean (default on) *E384* *E385*
global
- Searches wrap around the end of the file.
+ Searches wrap around the end of the file. Also applies to |]s| and
+ |[s|, searching for spelling mistakes.
*'write'* *'nowrite'*
'write' boolean (default on)
diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt
index 0b58614895..d2e07e5108 100644
--- a/runtime/doc/quickref.txt
+++ b/runtime/doc/quickref.txt
@@ -1,4 +1,4 @@
-*quickref.txt* For Vim version 7.0aa. Last change: 2005 Jul 27
+*quickref.txt* For Vim version 7.0aa. Last change: 2005 Aug 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -756,6 +756,7 @@ Short explanation of each option: *option-list*
|'maxmempattern'| |'mmp'| maximum memory (in Kbyte) used for pattern search
|'maxmemtot'| |'mmt'| maximum memory (in Kbyte) used for all buffers
|'menuitems'| |'mis'| maximum number of items in a menu
+|'mkspellmem'| |'msm'| memory used before |:mkspell| compresses the tree
|'modeline'| |'ml'| recognize modelines at start or end of file
|'modelines'| |'mls'| number of lines checked for modelines
|'modifiable'| |'ma'| changes to the text are not possible
diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt
index a90763d00f..b9e5114289 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 25
+*spell.txt* For Vim version 7.0aa. Last change: 2005 Aug 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -43,6 +43,7 @@ To search for the next misspelled word:
*]s* *E756*
]s Move to next misspelled word after the cursor.
A count before the command can be used to repeat.
+ 'wrapscan' applies.
*[s*
[s Like "]s" but search backwards, find the misspelled
@@ -514,7 +515,7 @@ used spelling files, use this command:
*:spelldump* *:spelld*
:spelld[ump] Open a new window and fill it with all currently valid
- words.
+ words. Compound words are not included.
Note: For some languages the result may be enormous,
causing Vim to run out of memory.
@@ -915,6 +916,12 @@ word itself is not a good word. Example:
NEEDAFFIX + ~
+ *spell-NEEDCOMPOUND*
+The NEEDCOMPOUND flag is used to require that a word is used as part of a
+compound word The word itself is not a good word. Example:
+
+ NEEDCOMPOUND & ~
+
COMPOUND WORDS *spell-compound*
@@ -988,13 +995,13 @@ A specific example: Allow a compound to be made of two words and a dash:
This allows for the word "start-end", but not "startend".
*spell-COMPOUNDMIN*
-The minimal byte length of a word used for concatenation is specified with
+The minimal character length of a word used for compounding is specified with
COMPOUNDMIN. Example:
COMPOUNDMIN 5 ~
-When omitted a minimal length of 3 bytes is used. Obviously you could just
-leave out the compound flag from short words instead, this feature is present
-for compatibility with Myspell.
+When omitted there is no minimal length. Obviously you could just leave out
+the compound flag from short words instead, this feature is present for
+compatibility with Myspell.
*spell-COMPOUNDMAX*
The maximum number of words that can be concatenated into a compound word is
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 74d177dd25..afa6b7b4ea 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -4226,6 +4226,7 @@ autocmd-patterns autocmd.txt /*autocmd-patterns*
autocmd-remove autocmd.txt /*autocmd-remove*
autocmd-searchpat autocmd.txt /*autocmd-searchpat*
autocmd-use autocmd.txt /*autocmd-use*
+autocmd-verbose autocmd.txt /*autocmd-verbose*
autocmd.txt autocmd.txt /*autocmd.txt*
autocmds-kept version5.txt /*autocmds-kept*
autocommand autocmd.txt /*autocommand*
diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt
index daad1875c0..7288d11ba6 100644
--- a/runtime/doc/term.txt
+++ b/runtime/doc/term.txt
@@ -1,4 +1,4 @@
-*term.txt* For Vim version 7.0aa. Last change: 2005 Jun 06
+*term.txt* For Vim version 7.0aa. Last change: 2005 Aug 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -291,6 +291,7 @@ Added by Vim (there are no standard codes for these):
t_WS set window size (height, width) in characters *t_WS* *'t_WS'*
t_SI start insert mode (bar cursor shape) *t_SI* *'t_SI'*
t_EI end insert mode (block cursor shape) *t_EI* *'t_EI'*
+ |termcap-cursor-shape|
t_RV request terminal version string (for xterm) *t_RV* *'t_RV'*
|xterm-8bit| |v:termresponse| |'ttymouse'| |xterm-codes|
@@ -427,6 +428,7 @@ Example for an xterm, this changes the color of the cursor: >
endif
NOTE: When Vim exits the shape for Normal mode will remain. The shape from
before Vim started will not be restored.
+{not available when compiled without the +cursorshape feature}
*termcap-title*
The 't_ts' and 't_fs' options are used to set the window title if the terminal
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 81c93f926c..f019ef0fa8 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 25
+*todo.txt* For Vim version 7.0aa. Last change: 2005 Aug 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -31,21 +31,14 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
-------------------- Known bugs and current work -----------------------
Spelling:
-- Use 'wrapscan' for "[s" and "]s"?
-
-- Is there a way to avoid compound IDs taking two utf-8 bytes?
-
-- Make COMPOUNDMIN 3 characters instead of 3 bytes.
-
- Check support of flags of two characters, numbers (comma separated) and HUH.
When using many compound flags, does regexp still work?
+- "zg" doesn't work for Thai?
+
- Compound word is accepted if nr of words is <= COMPOUNDMAX OR nr of
syllables <= COMPOUNDSYLMAX. Specify AND in the affix file?
-- ONLYINCOMPOUND -> NEEDCOMPOUND (also used for affix? or use "needcomp"
- after affix)
-
- COMPOUNDMAX -> COMPOUNDWORDMAX?
- Support flags on a suffix. Used for second level affixes.
@@ -54,6 +47,8 @@ Spelling:
flags of the word are not used.
Instead of "SFX a 0 add/FLAGS ." we could use "SFX a 0 add . /FLAGS".
+- NEEDCOMPOUND also used for affix? Or use "needcomp" after affix?
+
- Do we need a flag for the rule that when compounding is done the following
word doesn't have a capital after a word character, even for Onecap words?
@@ -1482,6 +1477,10 @@ Multi-byte characters:
7 In "-- INSERT (lang) --" show the name of the keymap used instead of
"lang". (Ilya Dogolazky)
- Make 'langmap' accept multi-byte characters.
+- Make 'breakat' accept multi-byte characters. Problem: can't use a lookup
+ table anymore (breakat_flags[]).
+ Simplistic solution: when 'formatoptions' contains "m" also break a line
+ at a multi-byte character >= 0x100.
- Do we need the reverse of 'keymap', like 'langmap' but with files and
multi-byte characters? E.g., when using a Russian keyboard.
- Add the possibility to enter mappings which are used whenever normal text
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index d0ee58dff2..4de328801b 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -1,4 +1,4 @@
-*various.txt* For Vim version 7.0aa. Last change: 2005 Jun 22
+*various.txt* For Vim version 7.0aa. Last change: 2005 Aug 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -268,6 +268,8 @@ N *+cmdline_info* |'showcmd'| and |'ruler'|
N *+comments* |'comments'| support
N *+cryptv* encryption support |encryption|
B *+cscope* |cscope| support
+m *+cursorshape* |termcap-cursor-shape| support
+m *+debug* Compiled for debugging.
N *+dialog_gui* Support for |:confirm| with GUI dialog.
N *+dialog_con* Support for |:confirm| with console dialog.
N *+dialog_con_gui* Support for |:confirm| with GUI and console dialog.
@@ -487,10 +489,11 @@ N *+X11* Unix only: can restore window title |X11|
*:verbose-cmd*
When 'verbose' is non-zero, listing the value of a Vim option or a key map or
-a user-defined function or a command or a highlight group will also display
-where it was last defined. If it was defined manually then there will be no
-"Last set" message. When it was defined while executing a function, user
-command or autocommand, the script in which it was defined is reported.
+a user-defined function or a command or a highlight group or an autocommand
+will also display where it was last defined. If it was defined manually then
+there will be no "Last set" message. When it was defined while executing a
+function, user command or autocommand, the script in which it was defined is
+reported.
{not available when compiled without the +eval feature}
*K*
diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt
index f1159e612d..aeb79e3655 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 24
+*version7.txt* For Vim version 7.0aa. Last change: 2005 Aug 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -327,7 +327,7 @@ Various new items *new-items-7*
Normal mode commands: ~
a", a' and a` New text objects to select quoted strings. |a'|
-i", i' and i' (Taro Muraoka)
+i", i' and i` (Taro Muraoka)
CTRL-W <Enter> In the quickfix window: opens a new window to show the
location of the error under the cursor.
@@ -565,8 +565,8 @@ For xterm most combinations of modifiers with function keys are recognized.
When 'verbose' is set the output of ":highlight" will show where a highlight
item was last set.
-When 'verbose' is set the output of ":map", ":command" and ":function"
-commands will show where it was last defined. (Yegappan Lakshmanan)
+When 'verbose' is set the output of the ":map", ":command", ":function" and
+":autocmd" commands will show where it was last defined. (Yegappan Lakshmanan)
==============================================================================
IMPROVEMENTS *improvements-7*
@@ -774,6 +774,11 @@ sorted: user commands, variables, syntax names, etc.
When no locale is set, thus using the "C" locale, Vim will work with latin1
characters, using it's own isupper()/toupper()/etc. functions.
+When using an rxvt terminal emulator guess the value of 'background' using the
+COLORFGBG environment variable. (Ciaran McCreesh)
+
+Also support t_SI and t_EI on Unix with normal features. (Ciaran McCreesh)
+
==============================================================================
COMPILE TIME CHANGES *compile-changes-7*
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 55cd02d328..33f312a929 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 24
+" Last Change: 2005 Aug 29
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -1200,7 +1200,7 @@ function! s:FTprogress_asm()
" This function checks for an assembly comment the first ten lines.
" If not found, assume Progress.
let lnum = 1
- while lnum <= 10
+ while lnum <= 10 && lnum < line('$')
let line = getline(lnum)
if line =~ '^\s*;' || line =~ '^\*'
call s:FTasm()
@@ -1227,9 +1227,9 @@ function! s:FTprogress_pascal()
" Look for either an opening comment or a program start.
" If not found, assume Progress.
let lnum = 1
- while lnum <= 10
+ while lnum <= 10 && lnum < line('$')
let line = getline(lnum)
- if line =~ '^\s*\(program\|procedure\|function\|const\|type\|var\)\>'
+ if line =~ '^\s*\(program\|unit\|procedure\|function\|const\|type\|var\)\>'
\ || line =~ '^\s*{' || line =~ '^\s*(\*'
setf pascal
return
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index 2446b9bd36..23c0379db0 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2005 Jul 11
+" Last Change: 2005 Aug 29
" If there already is an option window, jump to that one.
if bufwinnr("option-window") > 0
@@ -403,6 +403,8 @@ if has("syntax")
call <SID>OptionL("spc")
call append("$", "spellsuggest\tmethods used to suggest corrections")
call <SID>OptionG("sps", &sps)
+ call append("$", "mkspellmem\tamount of memory used by :mkspell before compressing")
+ call <SID>OptionG("msm", &msm)
endif
diff --git a/runtime/spell/bg/main.aap b/runtime/spell/bg/main.aap
index 5d984be51e..2ccea86c68 100644
--- a/runtime/spell/bg/main.aap
+++ b/runtime/spell/bg/main.aap
@@ -19,7 +19,6 @@ $SPELLDIR/bg.utf-8.spl : $FILES
../README_bg.txt: README_bg_BG.txt
:copy $source $target
- :sys $VIM $target -e -c "set ff=unix" -c wq
#
# Fetching the files from OpenOffice.org.
@@ -35,8 +34,9 @@ bg_BG.aff bg_BG.dic: {buildcheck=}
:fetch bg_BG.zip
:sys $UNZIP bg_BG.zip
:delete bg_BG.zip
- :sys $VIM bg_BG.aff -c "set ff=unix" -c "update" -c q
- :sys $VIM bg_BG.dic -c "set ff=unix" -c "update" -c q
+ :sys $VIM bg_BG.aff -e -c "set ff=unix" -c update -c q
+ :sys $VIM bg_BG.dic -e -c "set ff=unix" -c update -c q
+ :sys $VIM README_bg_BG.txt -e -c "set ff=unix" -c update -c q
@if not os.path.exists('bg_BG.orig.aff'):
:copy bg_BG.aff bg_BG.orig.aff
@if not os.path.exists('bg_BG.orig.dic'):
diff --git a/runtime/spell/main.aap b/runtime/spell/main.aap
index 87eddfdb76..ffb16b8185 100644
--- a/runtime/spell/main.aap
+++ b/runtime/spell/main.aap
@@ -4,7 +4,8 @@
# aap generate all the .spl files
# aap diff create all the diff files
-LANG = af am bg ca cs da de el en eo es fr fo gl he hr it nl ny pl sk th yi hu
+LANG = af am bg ca cs da de el en eo es fr fo gl he hr it nl ny pl ru sk
+ th yi hu
# "hu" is at the end, because it takes very long.
#
diff --git a/runtime/spell/ru/main.aap b/runtime/spell/ru/main.aap
new file mode 100644
index 0000000000..85aeca9aac
--- /dev/null
+++ b/runtime/spell/ru/main.aap
@@ -0,0 +1,104 @@
+# Aap recipe for Russian Vim spell files.
+
+# Use a freshly compiled Vim if it exists.
+@if os.path.exists('../../../src/vim'):
+ VIM = ../../../src/vim
+@else:
+ :progsearch VIM vim
+
+REGIONS = RU IE YO
+SPELLDIR = ..
+FILES = ru_$*(REGIONS).aff ru_$*(REGIONS).dic
+
+all: $SPELLDIR/ru.koi8-r.spl $SPELLDIR/ru.utf-8.spl \
+ $SPELLDIR/ru.cp1251.spl ../README_ru.txt
+
+$SPELLDIR/ru.koi8-r.spl : $FILES
+ :sys env LANG=ru_RU.KOI8-R $VIM -u NONE -e -c "mkspell! $SPELLDIR/ru ru_RU ru_IE ru_YO" -c q
+
+$SPELLDIR/ru.utf-8.spl : $FILES
+ :sys env LANG=ru_RU.UTF-8 $VIM -u NONE -e -c "mkspell! $SPELLDIR/ru ru_RU ru_IE ru_YO" -c q
+
+$SPELLDIR/ru.cp1251.spl : $FILES
+ :sys env LANG=ru_RU.CP1251 $VIM -u NONE -e -c "mkspell! $SPELLDIR/ru ru_RU ru_IE ru_YO" -c q
+
+../README_ru.txt: README_ru_$*(REGIONS).txt
+ :print ru_RU >! $target
+ :cat README_ru_RU.txt >> $target
+ :print =================================================== >>$target
+ :print ru_IE >> $target
+ :cat README_ru_IE.txt >> $target
+ :print =================================================== >>$target
+ :print ru_YO >> $target
+ :cat README_ru_YO.txt >> $target
+
+#
+# Fetching the files from OpenOffice.org.
+#
+OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
+:attr {fetch = $OODIR/%file%} ru_RU.zip ru_RU_ye.zip ru_RU_yo.zip
+
+# The files don't depend on the .zip file so that we can delete it.
+# Only download the zip file if the targets don't exist.
+# This is a bit tricky, since the file name includes the date.
+ru_RU.aff ru_RU.dic: {buildcheck=}
+ :assertpkg unzip
+ :fetch ru_RU.zip
+ :sys unzip ru_RU.zip
+ :delete ru_RU.zip
+ @if not os.path.exists('ru_RU.orig.aff'):
+ :copy ru_RU.aff ru_RU.orig.aff
+ @if not os.path.exists('ru_RU.orig.dic'):
+ :copy ru_RU.dic ru_RU.orig.dic
+ @if os.path.exists('ru_RU.diff'):
+ :sys patch <ru_RU.diff
+
+ru_IE.aff ru_IE.dic: {buildcheck=}
+ :assertpkg unzip
+ :fetch ru_RU_ye.zip
+ :sys unzip ru_RU_ye.zip
+ :delete ru_RU_ye.zip
+ :move ru_RU_ie.aff ru_IE.aff
+ :move ru_RU_ie.dic ru_IE.dic
+ :move README_ru_RU_ie.txt README_ru_IE.txt
+ @if not os.path.exists('ru_IE.orig.aff'):
+ :copy ru_IE.aff ru_IE.orig.aff
+ @if not os.path.exists('ru_IE.orig.dic'):
+ :copy ru_IE.dic ru_IE.orig.dic
+ @if os.path.exists('ru_IE.diff'):
+ :sys patch <ru_IE.diff
+
+ru_YO.aff ru_YO.dic: {buildcheck=}
+ :assertpkg unzip
+ :fetch ru_RU_yo.zip
+ :sys unzip ru_RU_yo.zip
+ :delete ru_RU_yo.zip
+ :move ru_RU_yo.aff ru_YO.aff
+ :move ru_RU_yo.dic ru_YO.dic
+ :move README_ru_RU_yo.txt README_ru_YO.txt
+ @if not os.path.exists('ru_YO.orig.aff'):
+ :copy ru_YO.aff ru_YO.orig.aff
+ @if not os.path.exists('ru_YO.orig.dic'):
+ :copy ru_YO.dic ru_YO.orig.dic
+ @if os.path.exists('ru_YO.diff'):
+ :sys patch <ru_YO.diff
+
+
+# Generate diff files, so that others can get the OpenOffice files and apply
+# the diffs to get the Vim versions.
+
+diff:
+ :assertpkg diff
+ :sys {force} diff -a -C 1 ru_RU.orig.aff ru_RU.aff >ru_RU.diff
+ :sys {force} diff -a -C 1 ru_RU.orig.dic ru_RU.dic >>ru_RU.diff
+ :sys {force} diff -a -C 1 ru_IE.orig.aff ru_IE.aff >ru_IE.diff
+ :sys {force} diff -a -C 1 ru_IE.orig.dic ru_IE.dic >>ru_IE.diff
+ :sys {force} diff -a -C 1 ru_YO.orig.aff ru_YO.aff >ru_YO.diff
+ :sys {force} diff -a -C 1 ru_YO.orig.dic ru_YO.dic >>ru_YO.diff
+
+
+# Check for updated spell files. When there are changes the
+# ".new.aff" and ".new.dic" files are left behind for manual inspection.
+
+check:
+ :print Doesn't work yet.
diff --git a/runtime/spell/ru/ru_RU.diff b/runtime/spell/ru/ru_RU.diff
new file mode 100644
index 0000000000..18560c3c17
--- /dev/null
+++ b/runtime/spell/ru/ru_RU.diff
@@ -0,0 +1,32 @@
+*** ru_RU.orig.dic Sat Aug 27 22:54:55 2005
+--- ru_RU.dic Sun Aug 28 11:46:34 2005
+***************
+*** 8767,8769 ****
+ блеклость/F
+- блеклый/A
+ блеклый/AZ
+--- 8767,8768 ----
+***************
+*** 98086,98088 ****
+ разряженный/AES
+- разряженный/AS
+ разубедивший/A
+--- 98085,98086 ----
+***************
+*** 115007,115009 ****
+ толки/B
+- толки/O
+ толкла/L
+--- 115005,115006 ----
+***************
+*** 119209,119211 ****
+ униженный/ASX
+- униженный/AX
+ унизавший/A
+--- 119206,119207 ----
+***************
+*** 120603,120605 ****
+ утонченный/ASX
+- утонченный/AX
+ утоп/L
+--- 120599,120600 ----
diff --git a/runtime/spell/ru/ru_YO.diff b/runtime/spell/ru/ru_YO.diff
new file mode 100644
index 0000000000..2cf8177ff9
--- /dev/null
+++ b/runtime/spell/ru/ru_YO.diff
@@ -0,0 +1,14 @@
+*** ru_YO.orig.dic Sat Aug 27 22:54:55 2005
+--- ru_YO.dic Sun Aug 28 11:46:58 2005
+***************
+*** 86471,86473 ****
+ почтённый/AS
+- почти
+ почти/B
+--- 86471,86472 ----
+***************
+*** 115246,115248 ****
+ толки/B
+- толки/O
+ толкла/L
+--- 115245,115246 ----
diff --git a/src/eval.c b/src/eval.c
index 01900713d0..f14a69b38c 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -10043,6 +10043,9 @@ f_has(argvars, rettv)
#ifdef FEAT_CSCOPE
"cscope",
#endif
+#ifdef CURSOR_SHAPE
+ "cursorshape",
+#endif
#ifdef DEBUG
"debug",
#endif
diff --git a/src/feature.h b/src/feature.h
index f007df69a4..0ab57e93a5 100644
--- a/src/feature.h
+++ b/src/feature.h
@@ -1081,7 +1081,8 @@
/* GUI and some consoles can change the shape of the cursor. The code is also
* needed for the 'mouseshape' option. */
-#if defined(FEAT_GUI) || defined(MCH_CURSOR_SHAPE) || defined(FEAT_MOUSESHAPE)
+#if defined(FEAT_GUI) || defined(MCH_CURSOR_SHAPE) || defined(FEAT_MOUSESHAPE) \
+ || (defined(UNIX) && defined(FEAT_NORMAL))
# define CURSOR_SHAPE
#endif
diff --git a/src/fileio.c b/src/fileio.c
index bb25ce7da4..a34048ceff 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -6865,6 +6865,10 @@ show_autocmd(ap, event)
if (got_int)
return;
msg_outtrans(ac->cmd);
+#ifdef FEAT_EVAL
+ if (p_verbose > 0)
+ last_set_msg(ac->scriptID);
+#endif
if (got_int)
return;
if (ac->next != NULL)
diff --git a/src/if_xcmdsrv.c b/src/if_xcmdsrv.c
index 4a091bd273..63faf0c189 100644
--- a/src/if_xcmdsrv.c
+++ b/src/if_xcmdsrv.c
@@ -460,10 +460,12 @@ serverSendToVim(dpy, name, cmd, result, server, asExpr, localLoop, silent)
/*
* Send the command to target interpreter by appending it to the
* comm window in the communication window.
+ * Length must be computed exactly!
*/
- length = STRLEN(name) + STRLEN(cmd) + 14;
#ifdef FEAT_MBYTE
- length += STRLEN(p_enc);
+ length = STRLEN(name) + STRLEN(p_enc) + STRLEN(cmd) + 14;
+#else
+ length = STRLEN(name) + STRLEN(cmd) + 10;
#endif
property = (char_u *)alloc((unsigned)length + 30);
@@ -480,6 +482,7 @@ serverSendToVim(dpy, name, cmd, result, server, asExpr, localLoop, silent)
serial++;
sprintf((char *)property + length, "%c-r %x %d",
0, (int_u)commWindow, serial);
+ /* Add length of what "-r %x %d" resulted in, skipping the NUL. */
length += STRLEN(property + length + 1) + 1;
res = AppendPropCarefully(dpy, w, commProperty, property, length + 1);
@@ -787,9 +790,10 @@ serverSendReply(name, str)
if (!WindowValid(dpy, win))
return -1;
- length = STRLEN(str) + 11;
#ifdef FEAT_MBYTE
- length += STRLEN(p_enc);
+ length = STRLEN(p_enc) + STRLEN(str) + 14;
+#else
+ length = STRLEN(str) + 10;
#endif
if ((property = (char_u *)alloc((unsigned)length + 30)) != NULL)
{
@@ -800,6 +804,7 @@ serverSendReply(name, str)
sprintf((char *)property, "%cn%c-n %s%c-w %x",
0, 0, str, 0, (unsigned int)commWindow);
#endif
+ /* Add length of what "%x" resulted in. */
length += STRLEN(property + length);
res = AppendPropCarefully(dpy, win, commProperty, property, length + 1);
vim_free(property);
@@ -1268,11 +1273,12 @@ serverEventProc(dpy, eventPtr)
ga_grow(&reply, 50 + STRLEN(p_enc));
sprintf(reply.ga_data, "%cr%c-E %s%c-s %s%c-r ",
0, 0, p_enc, 0, serial, 0);
+ reply.ga_len = 14 + STRLEN(serial);
#else
ga_grow(&reply, 50);
sprintf(reply.ga_data, "%cr%c-s %s%c-r ", 0, 0, serial, 0);
-#endif
reply.ga_len = 10 + STRLEN(serial);
+#endif
}
res = NULL;
if (serverName != NULL && STRICMP(name, serverName) == 0)
diff --git a/src/mbyte.c b/src/mbyte.c
index 9f2df3ad40..d446a5b417 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -2706,17 +2706,37 @@ mb_prevptr(line, p)
mb_charlen(str)
char_u *str;
{
- int count;
+ char_u *p = str;
+ int count;
- if (str == NULL)
+ if (p == NULL)
return 0;
- for (count = 0; *str != NUL; count++)
- str += (*mb_ptr2len)(str);
+ for (count = 0; *p != NUL; count++)
+ p += (*mb_ptr2len)(p);
return count;
}
+#if defined(FEAT_SYN_HL) || defined(PROTO)
+/*
+ * Like mb_charlen() but for a string with specified length.
+ */
+ int
+mb_charlen_len(str, len)
+ char_u *str;
+ int len;
+{
+ char_u *p = str;
+ int count;
+
+ for (count = 0; *p != NUL && p < str + len; count++)
+ p += (*mb_ptr2len)(p);
+
+ return count;
+}
+#endif
+
/*
* Try to un-escape a multi-byte character.
* Used for the "to" and "from" part of a mapping.
diff --git a/src/misc2.c b/src/misc2.c
index 58fb434d47..3057415543 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1664,7 +1664,7 @@ vim_strbyte(string, c)
/*
* Search for last occurrence of "c" in "string".
- * return NULL if not found.
+ * Return NULL if not found.
* Does not handle multi-byte char for "c"!
*/
char_u *
@@ -3289,6 +3289,8 @@ parse_shape_opt(what)
return NULL;
}
+# if defined(MCH_CURSOR_SHAPE) || defined(FEAT_GUI) \
+ || defined(FEAT_MOUSESHAPE) || defined(PROTO)
/*
* Return the index into shape_table[] for the current mode.
* When "mouse" is TRUE, consider indexes valid for the mouse pointer.
@@ -3346,6 +3348,7 @@ get_shape_idx(mouse)
#endif
return SHAPE_IDX_N;
}
+#endif
# if defined(FEAT_MOUSESHAPE) || defined(PROTO)
static int old_mouse_shape = 0;
diff --git a/src/option.c b/src/option.c
index 9b0e6360e7..98c0ad89ad 100644
--- a/src/option.c
+++ b/src/option.c
@@ -3257,6 +3257,8 @@ set_init_2()
#if !((defined(MSDOS) || defined(OS2) || defined(WIN3264)) && !defined(FEAT_GUI))
{
+ char_u *p;
+
/*
* If 'background' wasn't set by the user, try guessing the value,
* depending on the terminal name. Only need to check for terminals
@@ -3264,16 +3266,24 @@ set_init_2()
* "linux" Linux console
* "screen.linux" Linux console with screen
* "cygwin" Cygwin shell
+ * We also check the COLORFGBG environment variable, which is set by
+ * rxvt and derivatives. This variable contains either two or three
+ * values separated by semicolons; we want the last value in either
+ * case. If this value is 0-6 or 8, our background is dark.
*/
idx = findoption((char_u *)"bg");
if (!(options[idx].flags & P_WAS_SET)
&& (STRCMP(T_NAME, "linux") == 0
|| STRCMP(T_NAME, "screen.linux") == 0
- || STRCMP(T_NAME, "cygwin") == 0))
+ || STRCMP(T_NAME, "cygwin") == 0
+ || ((p = mch_getenv("COLORFGBG")) != NULL
+ && (p = vim_strrchr(p, ';')) != NULL
+ && ((p[1] >= '0' && p[1] <= '6') || p[1] == '8')
+ && p[2] == NUL)))
{
set_string_option_direct(NULL, idx, (char_u *)"dark", OPT_FREE);
- /* don't mark it as set, when starting the GUI it may be changed
- * again */
+ /* don't mark it as set, when starting the GUI it may be
+ * changed again */
options[idx].flags &= ~P_WAS_SET;
}
}
@@ -9777,15 +9787,15 @@ compatible_set()
static void
fill_breakat_flags()
{