0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00

updated for version 7.0015

This commit is contained in:
Bram Moolenaar 2004-09-06 17:44:46 +00:00
parent d4755bb0e0
commit 15d0a8c77d
25 changed files with 6921 additions and 123 deletions

View File

@ -354,6 +354,7 @@ lang: dist prepare
touch dist/$(VIMRTDIR)/src/po/sk.cp1250.po
touch dist/$(VIMRTDIR)/src/po/zh_CN.cp936.po
touch dist/$(VIMRTDIR)/src/po/ru.cp1251.po
touch dist/$(VIMRTDIR)/src/po/uk.cp1251.po
cd dist && tar cf $(VIMVER)-lang.tar $(VIMRTDIR)
gzip -9 dist/$(VIMVER)-lang.tar
@ -568,9 +569,9 @@ doslang: dist prepare no_title.vim dist/$(COMMENT_LANG)
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
# Add the message translations. Trick: skip ja.mo and use ja.sjis.mo instead.
# Same for cs.mo / cs.cp1250.mo, pl.mo / pl.cp1250.mo, sk.mo / sk.cp1250.mo,
# zh_CN.mo / zh_CN.cp936.mo and ru.mo / ru.cp1251.mo.
# zh_CN.mo / zh_CN.cp936.mo, uk.mo / uk.cp1251.mo and ru.mo / ru.cp1251.mo.
for i in $(LANG_DOS); do \
if test "$$i" != "src/po/ja.mo" -a "$$i" != "src/po/pl.mo" -a "$$i" != "src/po/cs.mo" -a "$$i" != "src/po/sk.mo" -a "$$i" != "src/po/zh_CN.mo" -a "$$i" != "src/po/ru.mo"; then \
if test "$$i" != "src/po/ja.mo" -a "$$i" != "src/po/pl.mo" -a "$$i" != "src/po/cs.mo" -a "$$i" != "src/po/sk.mo" -a "$$i" != "src/po/zh_CN.mo" -a "$$i" != "src/po/ru.mo" -a "$$i" != "src/po/uk.mo"; then \
n=`echo $$i | sed -e "s+src/po/\([-a-zA-Z0-9_]*\(.UTF-8\)*\)\(.sjis\)*\(.cp1250\)*\(.cp1251\)*\(.cp936\)*.mo+\1+"`; \
mkdir dist/vim/$(VIMRTDIR)/lang/$$n; \
mkdir dist/vim/$(VIMRTDIR)/lang/$$n/LC_MESSAGES; \

28
runtime/compiler/php.vim Normal file
View File

@ -0,0 +1,28 @@
" Vim compiler file
" Compiler: PHP
" Maintainer: Doug Kearns <djkea2@mugca.its.monash.edu.au>
" URL: http://mugca.its.monash.edu.au/~djkea2/vim/compiler/php.vim
" Last Change: 2004 Sep 05
if exists("current_compiler")
finish
endif
let current_compiler = "php"
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo
set cpo-=C
CompilerSet makeprg=php\ -lq
CompilerSet errorformat=%E<b>Parse\ error</b>:\ %m\ in\ <b>%f</b>\ on\ line\ <b>%l</b><br\ />,
\%W<b>Notice</b>:\ %m\ in\ <b>%f</b>\ on\ line\ <b>%l</b><br\ />,
\%EParse\ error:\ %m\ in\ %f\ on\ line\ %l,
\%WNotice:\ %m\ in\ %f</b>\ on\ line\ %l,
\%-G%.%#
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@ -1,4 +1,4 @@
*options.txt* For Vim version 7.0aa. Last change: 2004 Aug 30
*options.txt* For Vim version 7.0aa. Last change: 2004 Sep 04
VIM REFERENCE MANUAL by Bram Moolenaar
@ -473,6 +473,11 @@ options from a modeline, this is unusual. If you have two windows open and
the files in it set the same global option to a different value, the result
depends on which one was opened last.
When editing a file that was already loaded, only the window-local options
from the modeline are used. Thus if you manually changed a buffer-local
option after opening the file, it won't be changed if you edit the same buffer
in another window. But window-local options will be set.
*modeline-version*
If the modeline is only to be used for some versions of Vim, the version
number can be specified where "vim:" is used:
@ -6352,6 +6357,9 @@ A jump table for the options with a short description can be found at |Q_op|.
buffer list is restored from the viminfo file. Buffers
without a file name and buffers for help files are not written
to the viminfo file.
When followed by a number, the number specifies the maximum
number of buffers that are stored. Without a number all
buffers are stored.
' Maximum number of previously edited files for which the marks
are remembered. This parameter must always be included when
'viminfo' is non-empty.

View File

@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.0aa. Last change: 2004 Aug 31
*todo.txt* For Vim version 7.0aa. Last change: 2004 Sep 06
VIM REFERENCE MANUAL by Bram Moolenaar
@ -30,37 +30,15 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
Multi-byte char in file name causes trouble for opening, "send to" menu and
writing. Patches from Taro Muraoka:
~/Mail/oldmail/muraoka/in.00575
~/Mail/oldmail/muraoka/in.00577
Is there a limit on the buffer list in the viminfo file?
":n ~/.trashcan/bogus*" fills it.
When gvim is started from the context menu the xxd menu entries don't work
(Valencia). xxd.exe is not in $VIMRUNTIME.
Aborting at the ATTENTION prompt causes trouble:
buffer remains active, nwindows isn't closed (fixed in buffer.c)
alternate buffer gets "read error" flag.
":sbuf" and ":ball" leave an empty window behind.
Change in handle_swap_exists() also in 6.3?
Add remap-abbreviation solution to Vim 6.3? It's about adding REMAP_SKIP and
RM_ABBR in getchar.c.
Added ga_append() here: (also to 6.3?)
script_get(eap, cmd)
gui_do_findrepl(flags, find_text, repl_text, down)
serverGetVimNames(dpy) if_xcmdsrv.c, os_mswin.c
Win32: When the path to a file has Russian characters, ":cd %:p:h" doesn't
work. (Valery Kondakoff)
Win32: When an argument is typed in a console in the active codepage, and
'encoding' is "utf-8", detect this from illegal characters. Convert from
console or active codepage to utf-8 then.
Solved in os_mswin.c. Add to 6.3?
For version 7.0:
- Include many PATCHES:
@ -114,10 +92,10 @@ For version 7.0:
He will update the patch for 6.3.
Autocommands:
7 Completion of network shares, patch by Yasuhiro Matsumoto.
Update 2004 Jun 17.
Update 2004 Sep 6.
How does this work? Missing comments.
gettext() Translate a message. (Patch from Yasuhiro Matsumoto)
Update 2004 Jun 17
Update 2004 Sep 5
Missing docs. Search in 'runtimepath'?
How to get the messages into the .po files?
--- did not respond (yet) --
@ -219,6 +197,7 @@ For version 7.0:
- "INTELLISENSE". First cleanup the Insert-mode completion.
http://www.vim.org/scripts/script.php?script_id=747
http://sourceforge.net/projects/insenvim
http://cedet.sourceforge.net/intellisense.shtml (for Emacs)
- PERSISTENT UNDO: store undo in a file.
Support multiple threads. Show the list of changes in a window to be able
to select a version.
@ -283,10 +262,13 @@ Support ":set syntax=cpp.doxygen"? Suggested patch by Michael Geddes (9 Aug
2004). Should also work for 'filetype'.
Patch for 'breakindent' option: repeat indent for wrapped line. (Vaclav
Smilauer, 2004 Aug 17)
Smilauer, 2004 Sep 5)
Vi incompatibility:
9 In Ex mode, "u" undoes all changes, not just the last one. (John Cowan)
8 In Ex mode, an empty file doesn't have a first line, "1p" should fail.
8 In Ex mode, "1,3" should print three lines.
8 With undo/redo only marks in the changed lines should be changed. Other
marks should be kept. Vi keeps each mark at the same text, even when it
is deleted or restored. (Webb)
@ -2996,7 +2978,9 @@ Debug mode:
8 Add breakpoints for setting an option
8 Add breakpoints for assigning to a variable.
7 Add a watchpoint in the debug mode: An expression that breaks execution
when evaluating to non-zero.
when evaluating to non-zero. Add the "watchadd expr" command, stop when
the value of the expression changes. ":watchdel" deletes an item,
":watchlist" lists the items. (Charles Campbell)
7 Store the history from debug mode in viminfo.
7 Make the debug mode history available with histget() et al.

View File

@ -1,4 +1,4 @@
*version7.txt* For Vim version 7.0aa. Last change: 2004 Sep 01
*version7.txt* For Vim version 7.0aa. Last change: 2004 Sep 06
VIM REFERENCE MANUAL by Bram Moolenaar
@ -154,6 +154,13 @@ ABAB/4 syntax file. (Marius van Wyk)
SQL-Informix syntax file. (Dean L Hill)
PHP compiler plugin. (Doug Kearns)
New message translations: ~
The Ukranian messages are now also available in cp1251.
Others: ~
@ -215,6 +222,9 @@ VMS: In the usage message mention that a slash can be used to make a flag
upper case. Add color support to the builtin vt320 terminal codes.
(Zoltan Arpadffy)
For the '%' item in 'viminfo', allow a number to set a maximum for the number
of buffers.
==============================================================================
COMPILE TIME CHANGES *compile-changes-7*
@ -263,10 +273,6 @@ When indent was added automatically and then moving the cursor, the indent was
not deleted (like when pressing ESC). The "I" flag in 'cpoptions' can be used
to make it work the old way.
When <Space> is mapped to something that starts with a space, typing <Space>
does not expand abbreviations. Only disable expanding abbreviations when a
mapping is not remapped, not when the RHS starts with the LHS.
When opening a command-line window, 'textwidth' gets set to 78 by the Vim
filetype plugin. Reset 'textwidth' to 0 to avoid lines are broken.
@ -330,4 +336,16 @@ detected. Reset did_filetype in enter_buffer().
When using ":argdo" and the window already was at the first argument index,
but not actually editing it, the current buffer would be used instead.
When ":next dir/*" includes many matches, adding the names to the argument
list may take an awful lot of time and can't be interrupted. Allow
interrupting this.
When editing a file that was already loaded in a buffer, modelines were not
used. Now window-local options in the modeline are set. Buffer-local options
and global options remain unmodified.
Win32: When 'encoding' is set to "utf-8" in the vimrc file, files from the
command line with non-ASCII characters are not used correctly. Recode the
file names when 'encoding' is set, using the Unicode command line.
vim:tw=78:ts=8:ft=help:norl:

View File

@ -0,0 +1,246 @@
" Menu Translations: Ukrainian
" Maintainer: Bohdan Vlasyuk <bohdan@vstu.edu.ua>
" Last Change: 11 Oct 2001
"
" Please, see readme at htpp://www.vstu.edu.ua/~bohdan/vim before any
" complains, and even if you won't complain, read it anyway.
"
" Quit when menu translations have already been done.
if exists("did_menu_trans")
finish
endif
let did_menu_trans = 1
scriptencoding cp1251
" Help menu
menutrans &Help &Äîïîìîãà
menutrans &Overview<Tab><F1> &Çàãàëüíà\ ²íôîðìàö³ÿ<Tab><F1>
menutrans &User\ Manual &Êåð³âíèöòâî\ äëÿ\ êîðèñòóâà÷à
menutrans &How-to\ links &ßê-Çðîáèòè?
"menutrans &GUI &GIU
menutrans &Credits &Ïîäÿêè
menutrans Co&pying &Ðîçïîâñþäæåííÿ
menutrans O&rphans &Äîïîìîãà\ ñèðîòàì
menutrans &Version &Âåðñ³ÿ
menutrans &About Ïðî\ &ïðîãðàìó
" File menu
menutrans &File &Ôàéë
menutrans &Open\.\.\.<Tab>:e &³äêðèòè\.\.\.<Tab>:e
menutrans Sp&lit-Open\.\.\.<Tab>:sp &Ðîçä³ëèòè\ â³êíî\.\.\.<Tab>:sp
menutrans &New<Tab>:enew &Íîâèé<Tab>:enew
menutrans &Close<Tab>:close &Çàêðèòè<Tab>:close
menutrans &Save<Tab>:w Çà&ïàì'ÿòàòè<Tab>:w
menutrans Save\ &As\.\.\.<Tab>:sav Çàïàì'ÿòàòè\ &ÿê\.\.\.<Tab>:sav
menutrans Split\ &Diff\ with\.\.\. Ïî&ð³âíÿòè\ ç\.\.\.
menutrans Split\ Patched\ &By\.\.\. Çà&ëàòàòè\.\.\.
menutrans &Print &Äðóêóâàòè
menutrans Sa&ve-Exit<Tab>:wqa Çàïèñàòè\ ³\ âè&éòè<Tab>:wqa
menutrans E&xit<Tab>:qa &Âèõ³ä<Tab>:qa
" Edit menu
menutrans &Edit &Ðåäàãóâàòè
menutrans &Undo<Tab>u &³äì³íèòè<Tab>u
menutrans &Redo<Tab>^R &Ïîâåðíóòè<Tab>^R
menutrans Rep&eat<Tab>\. Ï&îâòîðèòè<Tab>\.
menutrans Cu&t<Tab>"+x Âè&ð³çàòè<Tab>"+x
menutrans &Copy<Tab>"+y &Êîï³þâàòè<Tab>"+y
menutrans &Paste<Tab>"+gP Â&ñòàâèòè<Tab>"+gP
menutrans Put\ &Before<Tab>[p Âñòàâèòè\ ïîïå&ðåäó<Tab>[p
menutrans Put\ &After<Tab>]p Âñòàâèòè\ ïñëÿ<Tab>]p
menutrans &Select\ all<Tab>ggVG Âè&áðàòè\ óñå<Tab>ggVG
menutrans &Find\.\.\. &Çíàéòè\.\.\.
menutrans Find\ and\ Rep&lace\.\.\. Çà&ì³íèòè\.\.\.
menutrans Settings\ &Window ³êíî\ &íàëàøòóâàíü
menutrans &Global\ Settings Çàãàëüí³\ íà&ëàøòóâàííÿ
menutrans F&ile\ Settings Íàëàøòóâàííÿ\ äëÿ\ &ôàéëó
menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! &Íóìåðàö³ÿ\ ðÿäê³â<Tab>:set\ nu!
menutrans Toggle\ &List\ Mode<Tab>:set\ list! Ðåæèì\ íà&äëèøêîâîãî\ â³äîáðàæåííÿ<Tab>:set\ list!
menutrans Toggle\ Line\ &Wrap<Tab>:set\ wrap! Ðåæèì\ &ïåðåíîñó<Tab>:set\ wrap!
menutrans Toggle\ W&rap\ at\ word<Tab>:set\ lbr! Ïåðåíîñèòè\ óñå\ &ñëîâî<Tab>:set\ lbr!
menutrans Toggle\ &expand-tab<Tab>:set\ et! Êîðèñòóâàòèñÿ\ ñèìâîëîì\ &òàáóëÿö³¿<Tab>:set\ et!
menutrans Toggle\ &auto-indent<Tab>:set\ ai! Àâòîìàòè÷íèé\ &â³äñòóï<Tab>:set\ ai!
menutrans Toggle\ &C-indenting<Tab>:set\ cin! ³äñòóïè\ äëÿ\ ìîâè\ &C<Tab>:set\ cin!
menutrans &Shiftwidth &Çñóâ
menutrans Te&xt\ Width\.\.\. &Øèðèíà\ òåêñòó\.\.\.
menutrans &File\ Format\.\.\. &Ôîðìàò\ ôàéëó\.\.\.
menutrans Soft\ &Tabstop Ïîçèö³ÿ\ &òàáóëÿö³¿
menutrans C&olor\ Scheme &Êîëüîðè
menutrans Select\ Fo&nt\.\.\. Âèáðàòè\ &øðèôò\.\.\.
menutrans &Keymap Ðåæèì\ êëàâ³àòóðè
menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! Âèä³ëÿòè\ &çðàçîê<Tab>:set\ hls!
menutrans Toggle\ &Ignore-case<Tab>:set\ ic! &Ðîçð³çíÿòè\ \âåëèê³\ òà\ ìàë³\ ë³òåðè<Tab>:set\ ic!
menutrans Toggle\ &Showmatch<Tab>:set\ sm! &Íåãàéíèé\ ïîøóê<Tab>:set\ sm!
menutrans &Context\ lines ʳëüê³ñòü\ &âàæëèâèõ\ ðÿäê³â
menutrans &Virtual\ Edit Êóðñîð\ &ðóõàºòüñÿ\ áåç\ ìåæ
menutrans Never ͳêîëè
menutrans Block\ Selection Âèá³ð\ Áëîêó
menutrans Insert\ mode Ðåæèì\ âñòàâêè
menutrans Block\ and\ Insert Âèá³ð\ ³\ âñòàâêà
menutrans Always Çàâæäè
menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! Ðåæèì\ &âñòàâêè<Tab>:set\ im!
menutrans Search\ &Path\.\.\. &Øëÿõ\ ïîøóêó\.\.\.
menutrans Ta&g\ Files\.\.\. Ôàéëè\ &ïîì³òîê\.\.\.
"
" GUI options
menutrans Toggle\ &Toolbar Ïàíåëü\ &³íñòðóìåíò³â
menutrans Toggle\ &Bottom\ Scrollbar &Íèæíÿ\ ë³í³éêà\ çñóâó
menutrans Toggle\ &Left\ Scrollbar &˳âà\ ë³í³éêà\ çñóâó
menutrans Toggle\ &Right\ Scrollbar &Ïðàâà\ ë³í³éêà\ çñóâó
" Programming menu
menutrans &Toolsíñòðóìåíòè
menutrans &Jump\ to\ this\ tag<Tab>g^] &Ïåðåéòè\ äî\ ïîì³òêè<Tab>g^]
menutrans Jump\ &back<Tab>^T Ïî&âåðíóòèñÿ<Tab>^T
menutrans Build\ &Tags\ File &Ñòâîðèòè\ ôàéë\ ïîì³òîê
" Folding
menutrans &Folding &Çãîðòêè
menutrans &Enable/Disable\ folds<Tab>zi &Äîçâîëèòè/çàáîðîíèòè\ çãîðòêè<Tab>zi
menutrans &View\ Cursor\ Line<Tab>zv &Áà÷èòè\ ðÿäîê\ ç\ êóðñîðîì<Tab>zv
menutrans Vie&w\ Cursor\ Line\ only<Tab>zMzx Áà÷èòè\ &ëèøå\ ðÿäîê\ ç\ êóðñîðîì<Tab>zMzx
menutrans C&lose\ more\ folds<Tab>zm Çàêðèòè\ &á³ëüøå\ çãîðòê³â<Tab>zm
menutrans &Close\ all\ folds<Tab>zM Çàêðèòè\ &óñ³\ çãîðòêè<Tab>zM
menutrans &Open\ all\ folds<Tab>zR ³äêðèòè\ ó&ñ³\ çãîðòêè<Tab>zR
menutrans O&pen\ more\ folds<Tab>zr ³äêðèòè\ áëüøå\ çãîðòê³â<Tab>zr
menutrans Create\ &Fold<Tab>zf Ñ&òâîðèòè\ çãîðòîê<Tab>zf
menutrans &Delete\ Fold<Tab>zd &Âèäàëèòè\ çãîðòîê<Tab>zd
menutrans Delete\ &All\ Folds<Tab>zD Âèäàëèò&è\ óñ³\ çãîðòêè<Tab>zD
menutrans Fold\ column\ &width &Òîâùèíà\ ðÿäêà\ çãîðòê³â
menutrans Fold\ Met&hod &Ìåòîä\ çãîðòàííÿ
menutrans M&anual &Ðó÷íèé
menutrans I&ndent &³äñòóï
menutrans E&xpression Â&èðàç
menutrans S&yntax &Ñèíòàêñè÷íî
menutrans Ma&rker Ïî&çíà÷êè
" Diff
menutrans &Diff Ïî&ð³âíÿííÿ
menutrans &Update &Ïîíîâèòè
menutrans &Get\ Block &Çàïîçè÷èòè\ ð³çíèöþ
menutrans &Put\ Block &Âïðîâàäèòè\ ð³çíèöþ
" Make and stuff...
menutrans &Make<Tab>:make &Áóäóâàòè(make)<Tab>:make
menutrans &List\ Errors<Tab>:cl &Ñïèñîê\ ïîìèëîê<Tab>:cl
menutrans L&ist\ Messages<Tab>:cl! Ñï&èñîê\ ïîâ³äîìëåíü<Tab>:cl!
menutrans &Next\ Error<Tab>:cn &Íàñòóïíà\ ïîìèëêà<Tab>:cn
menutrans &Previous\ Error<Tab>:cp &Ïîïåðåäíÿ\ ïîìèëêà<Tab>:cp
menutrans &Older\ List<Tab>:cold &Áóâø³\ ïîìèëêè<Tab>:cold
menutrans N&ewer\ List<Tab>:cnew &Ìàéáóòí³\ ïîìèëêè<Tab>:cnew
menutrans Error\ &Window &³êíî\ ïîìèëîê
menutrans &Update<Tab>:cwin &Ïîíîâèòè<Tab>:cwin
menutrans &Close<Tab>:cclose &Çàêðèòè<Tab>:cclose
menutrans &Open<Tab>:copen &³äêðèòè<Tab>:copen
menutrans &Set\ Compiler Âñòàíîâèòè\ &êîìï³ëÿòîð
menutrans &Convert\ to\ HEX<Tab>:%!xxd Ïåðåâåñòè\ â\ ø³ñòíàäöÿòêîâ³\ êîäè<Tab>:%!xxd
menutrans Conve&rt\ back<Tab>:%!xxd\ -r Ïîâåðíóòè\ â\ äâ³éêîâó\ ôîðìó<Tab>:%!xxd\ -r
" Names for buffer menu.
menutrans &Buffers &Áóôåðè
menutrans &Refresh\ menu &Ïîíîâèòè
menutrans Delete &Âèäàëèòè
menutrans &Alternate &Âòîðèííèé
menutrans &Next &Ñë³äóþ÷èé
menutrans &Previous &Ïîïåðåäí³é
menutrans [No\ File] [Íåìàº\ Ôàéëà]
" Window menu
menutrans &Window &³êíî
menutrans &New<Tab>^Wn &Íîâå<Tab>^Wn
menutrans S&plit<Tab>^Ws &Ðîçä³ëèòè<Tab>^Ws
menutrans Sp&lit\ To\ #<Tab>^W^^ Ðîçä³ëèòè\ äëÿ\ &âòîðèííîãî\ ôàéëó<Tab>^W^^
menutrans Split\ &Vertically<Tab>^Wv Ðîçä³ëèòè\ &ïîïåðåê<Tab>^Wv
"menutrans Split\ &Vertically<Tab>^Wv &Ðîçä³ëèòè\ ïîïåðåê<Tab>^Wv
menutrans Split\ File\ E&xplorer Ðîçä³ëèòè\ äëÿ\ &ïåðåãëÿäó\ ôàéë³â
menutrans &Close<Tab>^Wc &Çàêðèòè<Tab>^Wc
menutrans Close\ &Other(s)<Tab>^Wo Çàêðèòè\ óñ³\ &³íø³<Tab>^Wo
menutrans Ne&xt<Tab>^Ww &Íàñòóïíå<Tab>^Ww
menutrans P&revious<Tab>^WW &Ïîïåðåäíº<Tab>^WW
menutrans &Equal\ Size<Tab>^W= &Âèð³âíÿòè\ ðîçì³ð<Tab>^W=
menutrans &Max\ Height<Tab>^W_ Íàé&á³ëüøà\ âèñîòà<Tab>^W_
menutrans M&in\ Height<Tab>^W1_ Íàé&ìåíøà\ âèñîòà<Tab>^W1_
menutrans Max\ &Width<Tab>^W\| Íàéá³&ëüøà\ øèðèíà<Tab>^W\|
menutrans Min\ Widt&h<Tab>^W1\| Íàéìåí&øà\ øèðèíà<Tab>^W1\|
menutrans Move\ &To &Çì³ñòèòè
menutrans &Top<Tab>^WK Äî&ãîðè<Tab>^WK
menutrans &Bottom<Tab>^WJ Äî&íèçó<Tab>^WJ
menutrans &Left\ side<Tab>^WH Ó&ë³âî<Tab>^WH
menutrans &Right\ side<Tab>^WL Â&ïðàâî<Tab>^WL
menutrans Rotate\ &Up<Tab>^WR &Öèêë³÷íî\ äîãîðè<Tab>^WR
menutrans Rotate\ &Down<Tab>^Wr Ö&èêë³÷íî\ óíèç<Tab>^Wr
" The popup menu
menutrans &Undo &³äì³íèòè
menutrans Cu&t Âè&ð³çàòè
menutrans &Copy &Êîï³þâàòè
menutrans &Paste Â&ñòàâèòè
menutrans &Delete Âè&äàëèòè
menutrans Select\ &Word Âèáðàòè\ &ñëîâî
menutrans Select\ &Line Âèáðàòè\ &ðÿäîê
menutrans Select\ &Block Âèáðàòè\ &áëîê
menutrans Select\ &All Âèáðàòè\ &óñå
" The GUI toolbar
if has("toolbar")
if exists("*Do_toolbar_tmenu")
delfun Do_toolbar_tmenu
endif
fun Do_toolbar_tmenu()
tmenu ToolBar.Open ³äêðèòè ôàéë
tmenu ToolBar.Save Çàïàì'ÿòàòè ôàéë
tmenu ToolBar.SaveAll Çàïàì'ÿòàòè óñ³ ôàéëè
tmenu ToolBar.Print Äðóêóâàòè
tmenu ToolBar.Undo ³äì³íèòè
tmenu ToolBar.Redo Ïîâåðíóòè
tmenu ToolBar.Cut Âèð³çàòè
tmenu ToolBar.Copy Êîï³þâàòè
tmenu ToolBar.Paste Âñòàâèòè
tmenu ToolBar.Find Çíàéòè...
tmenu ToolBar.FindNext Çíàéòè íàñòóïíèé
tmenu ToolBar.FindPrev Çíàéòè ïîïåðåäí³é
tmenu ToolBar.Replace Çàì³íèòè...
tmenu ToolBar.LoadSesn Çàâàíòàæèòè ñåàíñ ðåäàãóâàííÿ
tmenu ToolBar.SaveSesn Çàïàì'ÿòàòè ñåàíñ ðåäàãóâàííÿ
tmenu ToolBar.RunScript Âèêîíàòè ôàéë êîìàíä
tmenu ToolBar.Make Çáóäóâàòè ïðîåêò
tmenu ToolBar.Shell Shell
tmenu ToolBar.RunCtags Ñòâîðèòè ôàéë ïîì³òîê
tmenu ToolBar.TagJump Ïåðåéòè äî ïîì³òêè
tmenu ToolBar.Help Äîïîìîãà
tmenu ToolBar.FindHelp Ïîøóê ó äîïîìîç³
endfun
endif
" Syntax menu
menutrans &Syntax &Ñèíòàêñèñ
menutrans Set\ '&syntax'\ only Âñòàíîâëþâàòè\ ëèøå\ '&syntax'
menutrans Set\ '&filetype'\ too Âñòàíîâëþâàòè\ '&filetype'\ òàêîæ
menutrans &Off &Âèìêíåíî
menutrans &Manual &Ðó÷íèé
menutrans A&utomatic &Àâòîìàòè÷íî
menutrans on/off\ for\ &This\ file Ïåðåìêíóòè\ äëÿ\ öüîãî\ &ôàéëà
menutrans Co&lor\ test Ïåðåâ³ðêà\ &êîëüîð³â
menutrans &Highlight\ test &Ïåðåâ³ðêà\ âèä³ëåííÿ
menutrans &Convert\ to\ HTML Ñòâîðèòè\ &HTML
" dialog texts
let menutrans_no_file = "[Íåìàº\ Ôàéëà]"
let menutrans_help_dialog = "Âêàæ³òü êîìàíäó àáî ñëîâî äëÿ ïîøóêó:\n\nÄîäàéòå i_ äëÿ êîìàíä ðåæèìó âñòàâêè (íàïð. i_CTRL-X)\nÄîäàéòå i_ äëÿ êîìàíäíîãî ðåæèìó (íàïð. ñ_<Del>)\nÄîäàéòå ' äëÿ ïîçíà÷åííÿ íàçâè îïö³¿ (íàïð. 'shiftwidth')"
let g:menutrans_path_dialog = "Âêàæ³òü øëÿõ ïîøóêó ôàéë³â\nÐîçä³ëÿéòå íàçâè äèðåêòîð³é êîìàìè."
let g:menutrans_tags_dialog = "Âêàæ³òü íàçâè ôàéë³â ïîì³òîê\nÐîçä³ëÿéòå íàçâè êîìàìè."
let g:menutrans_textwidth_dialog = "Âêàæ³òü íîâó øèðèíó òåêñòó (0 äëÿ â³äì³íè ôîìàòóâàííÿ)"
let g:menutrans_fileformat_dialog = "Âèáåð³òü ôîðìàò ôàéëó"

View File

@ -595,7 +595,7 @@ STDMETHODIMP CShellExt::QueryContextMenu(HMENU hMenu,
indexMenu++,
MF_STRING|MF_BYPOSITION,
idCmd++,
_("&Diff with Vim"));
_("Diff with Vim"));
m_edit_existing_off = 3;
}
else

View File

@ -252,7 +252,7 @@ open_buffer(read_stdin, eap)
/* Go to the buffer that was opened. */
aucmd_prepbuf(&aco, old_curbuf);
#endif
do_modelines();
do_modelines(FALSE);
curbuf->b_flags &= ~(BF_CHECK_RO | BF_NEVERLOADED);
#ifdef FEAT_AUTOCMD
@ -724,7 +724,7 @@ handle_swap_exists(old_curbuf)
ml_recover();
MSG_PUTS("\n"); /* don't overwrite the last message */
cmdline_row = msg_row;
do_modelines();
do_modelines(FALSE);
}
swap_exists_action = SEA_NONE;
got_int |= old_got_int;
@ -4338,14 +4338,15 @@ ex_buffer_all(eap)
*
* Returns immediately if the "ml" option isn't set.
*/
static int chk_modeline __ARGS((linenr_T));
static int chk_modeline __ARGS((linenr_T, int));
void
do_modelines()
do_modelines(win_only)
int win_only; /* Only do window-local options. */
{
linenr_T lnum;
int nmlines;
static int entered = 0;
linenr_T lnum;
int nmlines;
static int entered = 0;
if (!curbuf->b_p_ml || (nmlines = (int)p_mls) == 0)
return;
@ -4358,12 +4359,12 @@ do_modelines()
++entered;
for (lnum = 1; lnum <= curbuf->b_ml.ml_line_count && lnum <= nmlines;
++lnum)
if (chk_modeline(lnum) == FAIL)
if (chk_modeline(lnum, win_only) == FAIL)
nmlines = 0;
for (lnum = curbuf->b_ml.ml_line_count; lnum > 0 && lnum > nmlines
&& lnum > curbuf->b_ml.ml_line_count - nmlines; --lnum)
if (chk_modeline(lnum) == FAIL)
if (chk_modeline(lnum, win_only) == FAIL)
nmlines = 0;
--entered;
}
@ -4375,8 +4376,9 @@ do_modelines()
* Return FAIL if an error encountered.
*/
static int
chk_modeline(lnum)
chk_modeline(lnum, win_only)
linenr_T lnum;
int win_only; /* Only do window-local options. */
{
char_u *s;
char_u *e;
@ -4473,7 +4475,8 @@ chk_modeline(lnum)
save_SID = current_SID;
current_SID = SID_MODELINE;
#endif
retval = do_set(s, OPT_MODELINE | OPT_LOCAL);
retval = do_set(s, OPT_MODELINE | OPT_LOCAL
| (win_only ? OPT_WINONLY : 0));
#ifdef FEAT_EVAL
current_SID = save_SID;
#endif
@ -4558,10 +4561,14 @@ write_viminfo_bufferlist(fp)
win_T *win;
#endif
char_u *line;
int max_buffers;
if (find_viminfo_parameter('%') == NULL)
return;
/* Without a number -1 is returned: do all buffers. */
max_buffers = get_viminfo_parameter('%');
/* Allocate room for the file name, lnum and col. */
line = alloc(MAXPATHL + 30);
if (line == NULL)
@ -4585,6 +4592,8 @@ write_viminfo_bufferlist(fp)
|| removable(buf->b_ffname))
continue;
if (max_buffers-- == 0)
break;
putc('%', fp);
home_replace(NULL, buf->b_ffname, line, MAXPATHL, TRUE);
sprintf((char *)line + STRLEN(line), "\t%ld\t%d",

View File

@ -3059,6 +3059,11 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags)
#ifdef FEAT_AUTOCMD
else
{
/* Read the modelines, but only to set window-local options. Any
* buffer-local options have already been set and may have been
* changed by the user. */
do_modelines(TRUE);
apply_autocmds_retval(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf,
&retval);
apply_autocmds_retval(EVENT_BUFWINENTER, NULL, NULL, FALSE, curbuf,

View File

@ -4460,7 +4460,7 @@ ex_doautocmd(eap)
exarg_T *eap;
{
(void)do_doautocmd(eap->arg, TRUE);
do_modelines();
do_modelines(FALSE);
}
#endif
@ -6173,11 +6173,10 @@ handle_drop(filec, filev, split)
}
#endif
static void alist_clear __ARGS((alist_T *al));
/*
* Clear an argument list: free all file names and reset it to zero entries.
*/
static void
void
alist_clear(al)
alist_T *al;
{
@ -6264,8 +6263,8 @@ alist_expand()
&& new_arg_file_count > 0)
{
alist_set(&global_alist, new_arg_file_count, new_arg_files, TRUE);
vim_free(old_arg_files);
}
vim_free(old_arg_files);
}
p_su = save_p_su;
}
@ -6288,7 +6287,18 @@ alist_set(al, count, files, use_curbuf)
if (ga_grow(&al->al_ga, count) == OK)
{
for (i = 0; i < count; ++i)
{
if (got_int)
{
/* When adding many buffers this can take a long time. Allow
* interrupting here. */
while (i < count)
vim_free(files[i++]);
break;
}
alist_add(al, files[i], use_curbuf ? 2 : 1);
ui_breakcheck();
}
vim_free(files);
}
else
@ -9582,7 +9592,7 @@ ex_filetype(eap)
if (*arg == 'd')
{
(void)do_doautocmd((char_u *)"filetypedetect BufRead", TRUE);
do_modelines();
do_modelines(FALSE);
}
}
else if (STRCMP(arg, "off") == 0)

View File

@ -370,15 +370,21 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
* file may destroy it! Reported on MS-DOS and Win 95.
* If the name is too long we might crash further on, quit here.
*/
if (fname != NULL
&& *fname != NUL
&& (vim_ispathsep(*(fname + STRLEN(fname) - 1))
|| STRLEN(fname) >= MAXPATHL))
if (fname != NULL && *fname != NUL)
{
filemess(curbuf, fname, (char_u *)_("Illegal file name"), 0);
msg_end();
msg_scroll = msg_save;
return FAIL;
p = fname + STRLEN(fname) - 1;
if ((vim_ispathsep(*p)
#ifdef FEAT_MBYTE
/* Do not use a multi-byte char as path separator. */
&& (!has_mbyte || (*mb_head_off)(fname, p) == 0)
#endif
) || STRLEN(fname) >= MAXPATHL)
{
filemess(curbuf, fname, (char_u *)_("Illegal file name"), 0);
msg_end();
msg_scroll = msg_save;
return FAIL;
}
}
#ifdef UNIX
@ -7526,7 +7532,7 @@ ex_doautoall(eap)
/* execute the autocommands for this buffer */
retval = do_doautocmd(eap->arg, FALSE);
do_modelines();
do_modelines(FALSE);
/* restore the current window */
aucmd_restbuf(&aco);

View File

@ -1,4 +1,4 @@
/* vi:set ts=8 sts=0 sw=8:
/* vi:set ts=8 sts=4 sw=4:
*
* VIM - Vi IMproved by Bram Moolenaar
*
@ -371,12 +371,10 @@ gui_mch_destroy_menu(vimmenu_T * menu)//{{{
return;
}
#endif
if(menu->parent){
menu->parent->widget->removeItem((int)menu );
}
if (menu->widget){
if (menu->parent)
menu->parent->widget->removeItem((int)menu);
if (menu->widget)
delete menu->widget;
}
menu->widget = 0;
}//}}}
#endif /* FEAT_MENU */
@ -475,21 +473,24 @@ gui_mch_browse(int saving,//{{{
char_u * filter)
{
char * filt_glob;
if (filter != (char_u *) 0x0 ) {
if (filter != (char_u *) 0x0 )
{
filter = vim_strsave(filter);
strtok((char *) filter, "(");
filt_glob = strtok(0L, ")");
} else
}
else
filt_glob = (char *) filter;
gui_mch_mousehide(FALSE);
QString s;
if (! saving)
if (!saving)
s = KFileDialog::getOpenFileName( (char *) initdir, (char *) filt_glob, vmw, (char *) title );
else
s = KFileDialog::getSaveFileName( );
if (filter)
vim_free(filter);
@ -508,7 +509,7 @@ gui_mch_browse(int saving,//{{{
#ifdef FEAT_GUI_DIALOG
/* ARGSUSED */
int
int
gui_mch_dialog(int type, /* type of dialog *///{{{
char_u * title, /* title of dialog */
char_u * message, /* message text */
@ -516,29 +517,29 @@ gui_mch_dialog(int type, /* type of dialog *///{{{
int def_but, /* default button */
char_u *textfield)
{
gui_mch_mousehide(FALSE);
VimDialog vd(type, title, message, buttons, def_but,textfield);
int ret = vd.exec();
return ret;
gui_mch_mousehide(FALSE);
VimDialog vd(type, title, message, buttons, def_but,textfield);
int ret = vd.exec();
return ret;
}//}}}
#endif /* FEAT_GUI_DIALOG */
#if defined(FEAT_MENU) || defined(PROTO)
void
void
gui_mch_show_popupmenu(vimmenu_T * menu)//{{{
{
menu->widget->popup(QCursor::pos());
menu->widget->popup(QCursor::pos());
}//}}}
void
gui_make_popup (char_u *pathname) {//{{{
vimmenu_T *menu = gui_find_menu(pathname);
gui_make_popup (char_u *pathname)//{{{
{
vimmenu_T *menu = gui_find_menu(pathname);
if (menu != NULL) {
menu->widget->popup(QCursor::pos());
}
if (menu != NULL)
menu->widget->popup(QCursor::pos());
}//}}}
#endif
@ -548,19 +549,19 @@ gui_make_popup (char_u *pathname) {//{{{
void
gui_mch_find_dialog(exarg_T * eap)//{{{
{
// char_u* entry_text;
//int exact_word=FALSE;
// entry_text = get_find_dialog_text(eap->arg,&exact_word);
// char_u* entry_text;
//int exact_word=FALSE;
// entry_text = get_find_dialog_text(eap->arg,&exact_word);
vmw->finddlg->setCaseSensitive(true);
vmw->finddlg->setCaseSensitive(true);
/* if(entry_text!=NULL) {
vmw->finddlg->setText(QString((char*)entry_text));
// exact match should go there, hopefully KDE old KEdFind/KEdReplace will be replaced in KDE 4 as pple wanted KDE 3's Find/Replace to be kept
}*/ // Don't use it, KDE keeps old search in memory and vim give \\Csearch, which is difficult to handle
// vim_free(entry_text);
/* if (entry_text!=NULL) {
vmw->finddlg->setText(QString((char*)entry_text));
// exact match should go there, hopefully KDE old KEdFind/KEdReplace will be replaced in KDE 4 as pple wanted KDE 3's Find/Replace to be kept
}*/ // Don't use it, KDE keeps old search in memory and vim give \\Csearch, which is difficult to handle
// vim_free(entry_text);
vmw->finddlg->show();
vmw->finddlg->show();
}//}}}
void
@ -571,7 +572,7 @@ gui_mch_replace_dialog(exarg_T * eap)//{{{
// entry_text = get_find_dialog_text(eap->arg,&exact_word);
/* if(entry_text!=NULL) {
/* if (entry_text!=NULL) {
vmw->repldlg->setText(QString((char*)entry_text));
// exact match should go there, hopefully KDE old KEdFind/KEdReplace will be replaced in KDE 4 as pple wanted KDE 3's Find/Replace to be kept
}*/

View File

@ -112,7 +112,7 @@ gui_mch_prepare(int *argc, char **argv)// {{{
i--;
continue;
}
if (strcmp(argv[i],"--servername")==0) {
argServerName = new QString(argv[i+1]); // to get the serverName now
}
@ -182,7 +182,7 @@ gui_mch_prepare(int *argc, char **argv)// {{{
) {
gui_argv[gui_argc++] = argv[i];
}
//KDE/Qt options with one arg
if ( strcmp(argv[i],"--session")==0
@ -211,7 +211,7 @@ gui_mch_prepare(int *argc, char **argv)// {{{
gui_argv[gui_argc++] = argv[i+1];
found=2;
}
//remove from the list of argv
if (found >= 1 && --*argc>i) {
mch_memmove(&argv[i], &argv[i + 1],
@ -385,7 +385,7 @@ gui_mch_open()//{{{
#endif
if (startfont!=NULL)
gui_mch_init_font((char_u*)startfont->latin1(),0);
if (startsize!=NULL)
vmw->resize(startsize->width(), startsize->height());
@ -394,7 +394,7 @@ gui_mch_open()//{{{
if (kapp->isRestored())
if (KMainWindow::canBeRestored(1))
vmw->restore(1);
vmw->show();
#if QT_VERSION>=300
if (tip==2) KTipDialog::showTip (vmw,QString::null,true);
@ -559,8 +559,9 @@ gui_mch_init_font(char_u * font_name, int fontset)//{{{
{
QString fontname;
GuiFont font=NULL;
if (font_name==NULL) {
if (font_name==NULL)
{
#if 0
#if QT_VERSION>=300
KConfig *base = KGlobal::config();
@ -568,7 +569,7 @@ gui_mch_init_font(char_u * font_name, int fontset)//{{{
KConfigBase *base = KGlobal::config();
#endif
base->setGroup("General");
if(!base->hasKey("fixed")) {
if (!base->hasKey("fixed")) {
KMessageBox::error(KApplication::kApplication()->mainWidget(),"Cannot load default fixed font\n\nConfigure fonts in KDE Control Center.\n(Just click 'Choose...', 'OK' and then 'Apply')");
return FAIL;
}
@ -614,11 +615,20 @@ gui_mch_init_font(char_u * font_name, int fontset)//{{{
if (fontname.contains('*') && fontname.contains('-'))
return FAIL;
/* Compute the width of the character cell. Some fonts include
* double-width characters. Use the width of ASCII characters to find
* out if this is so. */
QFontMetrics f(*font);
gui.char_width = f.maxWidth();
int width_max = 0;
for (char c = 32; c < 127; c++)
if (width_max < f.width((QChar)c))
width_max = f.width((QChar)c);
if (width_max <= f.maxWidth() / 2)
width_max = f.maxWidth() / 2;
gui.char_width = width_max;
gui.char_height = f.height()+p_linespace;
gui.char_ascent = f.ascent()+p_linespace/2;
gui.char_ascent = f.ascent()+p_linespace;
//check values, just to make sure and avoid a crash
if (gui.char_width<=0) gui.char_width=8;
if (gui.char_height<=0) gui.char_height=1;
@ -778,7 +788,7 @@ gui_mch_mousehide(int hide)//{{{
{
if (hide == gui.pointer_hidden) return;
//#ifdef FEAT_MOUSESHAPE
// if( !hide) mch_set_mouse_shape(last_shape);
// if (!hide) mch_set_mouse_shape(last_shape);
//#else
# if (QT_VERSION<300)
gui.w->setCursor((hide)?BlankCursor:ArrowCursor);
@ -1092,7 +1102,7 @@ clip_mch_set_selection(VimClipboard *cbd){//{{{
long_u length;
clip_get_selection(cbd);
if(clip_convert_selection(&data,&length,cbd)<0) return;
if (clip_convert_selection(&data,&length,cbd)<0) return;
QString selection((const char *) data);
//We must turncate the string because it is not
@ -1156,7 +1166,7 @@ gui_mch_enable_scrollbar(scrollbar_T * sb, int flag)//{{{
if (gui.which_scrollbars[SBAR_LEFT]) width += gui.scrollbar_width;
if (gui.which_scrollbars[SBAR_RIGHT]) width += gui.scrollbar_width;
if (gui.which_scrollbars[SBAR_BOTTOM]) height += gui.scrollbar_height;
if (vmw->menuBar()->isVisible() && vmw->menuBar()->isEnabled()
#if QT_VERSION>=300
&& !vmw->menuBar()->isTopLevelMenu()

View File

@ -3376,6 +3376,16 @@ get_cmd_args(char *prog, char *cmdline, char ***argvp, char **tofree)
{
if (pnew != NULL)
*pnew++ = *p;
#ifdef FEAT_MBYTE
/* Can't use mb_* functions, because 'encoding' is not
* initialized yet here. */
if (IsDBCSLeadByte(*p))
{
++p;
if (pnew != NULL)
*pnew++ = *p;
}
#endif
++p;
}
}

View File

@ -1065,6 +1065,16 @@ scripterror:
2 /* add buffer number now and use curbuf */
#endif
);
#if defined(FEAT_MBYTE) && defined(WIN32)
{
extern void used_file_arg(char *, int, int);
/* Remember this argument has been added to the argument list.
* Needed when 'encoding' is changed. */
used_file_arg(argv[0], literal, full_path);
}
#endif
}
/*
@ -1133,6 +1143,17 @@ scripterror:
#endif
fname = alist_name(&GARGLIST[0]);
}
#if defined(WIN32) && defined(FEAT_MBYTE)
{
extern void set_alist_count(void);
/* Remember the number of entries in the argument list. If it changes
* we don't react on setting 'encoding'. */
set_alist_count();
}
#endif
if (GARGCOUNT > 1)
printf(_("%d files to edit\n"), GARGCOUNT);
#ifdef MSWIN
@ -1756,7 +1777,7 @@ scripterror:
ml_recover();
if (curbuf->b_ml.ml_mfp == NULL) /* failed */
getout(1);
do_modelines(); /* do modelines */
do_modelines(FALSE); /* do modelines */
}
else
{

View File

@ -426,6 +426,9 @@ mb_init()
vimconv_T vimconv;
char_u *p;
#endif
#ifdef WIN32
int prev_enc_utf8 = enc_utf8;
#endif
if (p_enc == NULL)
{
@ -684,6 +687,17 @@ codepage_invalid:
enc_utf8 ? "utf-8" : (char *)p_enc);
#endif
#ifdef WIN32
/* When changing 'encoding' while starting up, then convert the command
* line arguments from the active codepage to 'encoding'. */
if (starting != 0)
{
extern void fix_arg_enc(void);
fix_arg_enc();
}
#endif
#ifdef FEAT_AUTOCMD
/* Fire an autocommand to let people do custom font setup. This must be
* after Vim has been setup for the new encoding. */

View File

@ -3529,6 +3529,12 @@ do_set(arg, opt_flags)
goto skip;
}
/* Skip all options that are not window-local (used when showing
* an already loaded buffer in a window). */
if ((opt_flags & OPT_WINONLY)
&& (opt_idx < 0 || options[opt_idx].var != VAR_WIN))
goto skip;
#ifdef HAVE_SANDBOX
/* Disallow changing some options in the sandbox */
if (sandbox > 0 && (flags & P_SECURE))
@ -4280,7 +4286,8 @@ set_options_bin(oldval, newval, opt_flags)
* Find the parameter represented by the given character (eg ', :, ", or /),
* and return its associated value in the 'viminfo' string.
* Only works for number parameters, not for 'r' or 'n'.
* If the parameter is not specified in the string, return -1.
* If the parameter is not specified in the string or there is no following
* number, return -1.
*/
int
get_viminfo_parameter(type)
@ -5149,7 +5156,13 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
while (*++s && *s != ',')
;
}
else if (*s == '%' || *s == '!' || *s == 'h' || *s == 'c')
else if (*s == '%')
{
/* optional number */
while (vim_isdigit(*++s))
;
}
else if (*s == '!' || *s == 'h' || *s == 'c')
++s; /* no extra chars */
else /* must have a number */
{

View File

@ -443,6 +443,10 @@ vim_stat(const char *name, struct stat *stp)
p = buf + strlen(buf);
if (p > buf)
--p;
#ifdef FEAT_MBYTE
if (p > buf && has_mbyte)
p -= (*mb_head_off)(buf, p);
#endif
if (p > buf && (*p == '\\' || *p == '/') && p[-1] != ':')
*p = NUL;
#ifdef FEAT_MBYTE
@ -624,6 +628,23 @@ mch_chdir(char *path)
if (*path == NUL) /* drive name only */
return 0;
#ifdef FEAT_MBYTE
if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
{
WCHAR *p = enc_to_ucs2(path, NULL);
int n;
if (p != NULL)
{
n = _wchdir(p);
vim_free(p);
if (n == 0)
return 0;
/* Retry with non-wide function (for Windows 98). */
}
}
#endif
return chdir(path); /* let the normal chdir() do the rest */
}

View File

@ -30,6 +30,24 @@ VimMain
__ARGS((int argc, char **argv));
int (_cdecl *pmain)(int, char **);
#ifdef FEAT_MBYTE
/* The commandline arguments in UCS2. */
static DWORD nArgsW = 0;
static LPWSTR *ArglistW = NULL;
static int global_argc;
static char **global_argv;
static int used_file_argc = 0; /* last argument in global_argv[] used
for the argument list. */
static int *used_file_indexes = NULL; /* indexes in global_argv[] for
command line arguments added to
the argument list */
static int used_file_count = 0; /* nr of entries in used_file_indexes */
static int used_file_literal = FALSE; /* take file names literally */
static int used_file_full_path = FALSE; /* file name was full path */
static int used_alist_count = 0;
#endif
#ifndef PROTO
#ifdef FEAT_GUI
#ifndef VIMDLL
@ -45,7 +63,7 @@ WinMain(
LPSTR lpszCmdLine,
int nCmdShow)
{
int argc;
int argc = 0;
char **argv;
char *tofree;
char prog[256];
@ -58,15 +76,56 @@ WinMain(
* startup path (so the .vimrc file can be found w/o a VIM env. var.) */
GetModuleFileName(NULL, prog, 255);
/* Separate the command line into arguments. */
argc = get_cmd_args(prog, (char *)lpszCmdLine, &argv, &tofree);
if (argc == 0)
/* Separate the command line into arguments. Use the Unicode functions
* when possible. When 'encoding' is later changed these are used to
* recode the arguments. */
#ifdef FEAT_MBYTE
ArglistW = CommandLineToArgvW(GetCommandLineW(), &nArgsW);
if (ArglistW != NULL)
{
MessageBox(0, _("Could not allocate memory for command line."),
_("VIM Error"), 0);
return 0;
argv = malloc((nArgsW + 1) * sizeof(char *));
if (argv != NULL)
{
int i;
argv[argc] = NULL;
argc = nArgsW;
for (i = 0; i < argc; ++i)
{
int len;
WideCharToMultiByte_alloc(GetACP(), 0,
ArglistW[i], wcslen(ArglistW[i]) + 1,
(LPSTR *)&argv[i], &len, 0, 0);
if (argv[i] == NULL)
{
while (i > 0)
free(argv[--i]);
free(argv);
argc = 0;
}
}
}
}
if (argc == 0)
#endif
{
argc = get_cmd_args(prog, (char *)lpszCmdLine, &argv, &tofree);
if (argc == 0)
{
MessageBox(0, "Could not allocate memory for command line.",
"VIM Error", 0);
return 0;
}
}
#ifdef FEAT_MBYTE
global_argc = argc;
global_argv = argv;
used_file_indexes = malloc(argc * sizeof(int));
#endif
#ifdef DYNAMIC_GETTEXT
/* Initialize gettext library */
dyn_libintl_init(NULL);
@ -130,7 +189,109 @@ errout:
#endif
free(argv);
free(tofree);
#ifdef FEAT_MBYTE
if (ArglistW != NULL)
GlobalFree(ArglistW);
#endif
return 0;
}
#endif
#ifdef FEAT_MBYTE
/*
* Remember "name" is an argument that was added to the argument list.
* This avoids that we have to re-parse the argument list when fix_arg_enc()
* is called.
*/
void
used_file_arg(name, literal, full_path)
char *name;
int literal;
int full_path;
{
int i;
if (used_file_indexes == NULL)
return;
for (i = used_file_argc + 1; i < global_argc; ++i)
if (STRCMP(global_argv[i], name) == 0)
{
used_file_argc = i;
used_file_indexes[used_file_count++] = i;
break;
}
used_file_literal = literal;
used_file_full_path = full_path;
}
/*
* Remember the length of the argument list as it was. If it changes then we
* leave it alone when 'encoding' is set.
*/
void
set_alist_count(void)
{
used_alist_count = GARGCOUNT;
}
/*
* Fix the encoding of the command line arguments. Invoked when 'encoding'
* has been changed while starting up. Use the UCS-2 command line arguments
* and convert them to 'encoding'.
*/
void
fix_arg_enc()
{
int i;
int idx;
char_u *str;
/* Safety checks:
* - if argument count differs between the wide and non-wide argument
* list, something must be wrong.
* - the file name arguments must have been located.
* - the length of the argument list wasn't changed by the user.
*/
if (global_argc != (int)nArgsW
|| ArglistW == NULL
|| used_file_indexes == NULL
|| used_file_count == 0
|| used_alist_count != GARGCOUNT)
return;
/* Clear the argument list. Make room for the new arguments. */
alist_clear(&global_alist);
if (ga_grow(&global_alist.al_ga, used_file_count) == FAIL)
return; /* out of memory */
for (i = 0; i < used_file_count; ++i)
{
idx = used_file_indexes[i];
str = ucs2_to_enc(ArglistW[idx], NULL);
if (str != NULL)
alist_add(&global_alist, str, used_file_literal ? 2 : 0);
}
if (!used_file_literal)
{
/* Now expand wildcards in the arguments. */
/* Temporarily add '(' and ')' to 'isfname'. These are valid
* filename characters but are excluded from 'isfname' to make
* "gf" work on a file name in parenthesis (e.g.: see vim.h). */
do_cmdline_cmd((char_u *)":let SaVe_ISF = &isf|set isf+=(,)");
alist_expand();
do_cmdline_cmd((char_u *)":let &isf = SaVe_ISF|unlet SaVe_ISF");
}
/* If wildcard expansion failed, we are editing the first file of the
* arglist and there is no file name: Edit the first argument now. */
if (curwin->w_arg_idx == 0 && curbuf->b_fname == NULL)
{
do_cmdline_cmd((char_u *)":rewind");
if (GARGCOUNT == 1 && used_file_full_path)
(void)vim_chdirfile(alist_name(&GARGLIST[0]));
}
}
#endif

View File

@ -2207,7 +2207,6 @@ mch_exit(int r)
}
#endif /* !FEAT_GUI_W32 */
/*
* Do we have an interactive window?
*/

View File

@ -56,7 +56,7 @@ uninstall:
done
converted: ja.sjis.mo cs.cp1250.mo pl.cp1250.mo sk.cp1250.mo zh_CN.cp936.mo \
ru.cp1251.mo
ru.cp1251.mo uk.cp1251.mo
# Convert ja.po to create ja.sjis.po. Requires doubling backslashes in the
# second byte. Don't depend on sjiscorr, it should only be compiled when
@ -100,6 +100,12 @@ ru.cp1251.po: ru.po
iconv -f utf-8 -t cp1251 ru.po | \
sed -e 's/charset=utf-8/charset=cp1251/' -e 's/# Original translations/# Generated from ru.po, DO NOT EDIT/' > ru.cp1251.po
# Convert uk.po to create uk.cp1251.po.
uk.cp1251.po: uk.po
rm -f uk.cp1251.po
iconv -f koi8-u -t cp1251 uk.po | \
sed -e 's/charset=koi8-u/charset=cp1251/' -e 's/# Original translations/# Generated from uk.po, DO NOT EDIT/' > uk.cp1251.po
check:
@if test "x" = "x$(prefix)"; then \
echo "******************************************"; \

6225
src/po/uk.cp1251.po Normal file

File diff suppressed because it is too large Load Diff

View File

@ -45,7 +45,7 @@ void fname_expand __ARGS((buf_T *buf, char_u **ffname, char_u **sfname));
char_u *alist_name __ARGS((aentry_T *aep));
void do_arg_all __ARGS((int count, int forceit));
void ex_buffer_all __ARGS((exarg_T *eap));
void do_modelines __ARGS((void));
void do_modelines __ARGS((int win_only));
int read_viminfo_bufferlist __ARGS((vir_T *virp, int writing));
void write_viminfo_bufferlist __ARGS((FILE *fp));
char *buf_spname __ARGS((buf_T *buf));

View File

@ -21,6 +21,7 @@ char_u *get_user_cmd_nargs __ARGS((expand_T *xp, int idx));
char_u *get_user_cmd_complete __ARGS((expand_T *xp, int idx));
void not_exiting __ARGS((void));
void handle_drop __ARGS((int filec, char_u **filev, int split));
void alist_clear __ARGS((alist_T *al));
void alist_init __ARGS((alist_T *al));
void alist_unlink __ARGS((alist_T *al));
void alist_new __ARGS((void));

View File

@ -985,6 +985,7 @@ extern char* (*dyn_libintl_textdomain)(const char* domainname);
#define OPT_GLOBAL 2 /* use global value */
#define OPT_LOCAL 4 /* use local value */
#define OPT_MODELINE 8 /* option in modeline */
#define OPT_WINONLY 16 /* only set window-local options */
/* Magic chars used in confirm dialog strings */
#define DLG_BUTTON_SEP '\n'