Compare commits

..

19 Commits

Author SHA1 Message Date
Bram Moolenaar
0413d48711 updated for version 7.2.357
Problem:    When changing 'fileformat' from/to "mac" and there is a CR in the
            text the display is wrong.
Solution:   Redraw the text when 'fileformat' is changed. (Ben Schmidt)
2010-02-11 17:02:11 +01:00
Bram Moolenaar
6dfc28be25 Updated runtime files. 2010-02-11 14:19:15 +01:00
Bram Moolenaar
cee6a352b2 updated for version 7.2.356
Problem:    When 'foldmethod' is changed not all folds are closed as expected.
Solution:   In foldUpdate() correct the start position and reset fd_flags when
            w_foldinvalid is set. (Lech Lorens)
2010-02-03 18:14:49 +01:00
Bram Moolenaar
6427c608e7 updated for version 7.2.355
Problem:    Computing the cursor column in validate_cursor_col() is wrong when
            line numbers are used and 'n' is not in 'cpoptions', causing the
            popup menu to be positioned wrong.
Solution:   Correctly use the offset. (partly by Dominique Pelle)
2010-02-03 17:43:07 +01:00
Bram Moolenaar
990bb661a1 updated for version 7.2.354
Problem:    Japanese single-width double-byte characters not handled correctly.
Solution:   Put 0x8e in ScreenLines[] and the second byte in ScreenLines2[].
            (partly by Kikuchan)
2010-02-03 15:48:04 +01:00
Bram Moolenaar
f86f26c06a updated for version 7.2.353
Problem:    No command line completion for ":profile".
Solution:   Complete the subcommand and file name.
2010-02-03 15:14:22 +01:00
Bram Moolenaar
4d526ad35a updated for version 7.2.352
Problem:    Win64: Vim doesn't work when cross-compiled with MingW libraries.
Solution:   Always return TRUE for the WM_NCCREATE message. (Andy Kittner)
2010-02-03 12:23:24 +01:00
Bram Moolenaar
d21d9a6c61 updated for version 7.2.351
Problem:    Can't build with some compilers.
Solution:   Move the #ifdef outside of a macro.  Cleanup the code.
2010-01-28 22:58:16 +01:00
Bram Moolenaar
c5d5d01ad9 updated for version 7.2.350
Problem:    Win32: When changing font the window may jump from the secondary
            to the primary screen. (Michael Wookey)
Solution:   When the screen position was negative don't correct it to zero.
2010-01-27 21:05:05 +01:00
Bram Moolenaar
6d1dcffc35 updated for version 7.2.349
Problem:    CTRL-W gf doesn't put the new tab in the same place as "tab split"
            and "gf". (Tony Mechelynck)
Solution:   Store the tab number in cmdmod.tab.
2010-01-27 20:26:46 +01:00
Bram Moolenaar
da4d7a92d5 updated for version 7.2.348
Problem:    Unicode double-width characters are not up-to date.
Solution:   Produce the double-width table like the others.
2010-01-27 18:29:26 +01:00
Bram Moolenaar
0dbf720d86 updated for version 7.2.347
Problem:    Crash when executing <expr> mapping redefines that same mapping.
Solution:   Save the values used before evaluating the expression.
2010-01-27 17:31:43 +01:00
Bram Moolenaar
38ef43b262 updated for version 7.2.346
Problem:    Repeating a command with @: causes a mapping to be applied twice.
Solution:   Do not remap characters inserted in the typeahead buffer. (Kana
            Natsuno)
2010-01-27 16:31:13 +01:00
Bram Moolenaar
5075aad6a8 updated for version 7.2.345
Problem:    Tab line is not updated when the value of 'bt' is changed.
Solution:   Call redraw_titles(). (Lech Lorens)
2010-01-27 15:58:13 +01:00
Bram Moolenaar
7ad01410da Add more pathdef.c to .hgignore. 2010-01-20 21:56:50 +01:00
Bram Moolenaar
8d8ef0b0b9 updated for version 7.2.344
Problem:    Can't compile on some systems
Solution:   Move the #ifdef outside of the mch_open macro. (Patrick Texier)
2010-01-20 21:41:47 +01:00
Bram Moolenaar
fc307fa1a6 updated for version 7.2.343
Problem:    Can't compile on Win32.
Solution:   Insert the missing bar.
2010-01-19 23:30:41 +01:00
Bram Moolenaar
d836bb90ab updated for version 7.2.342
Problem:    Popup menu displayed wrong in 'rightleft' mode when there are
            multi-byte characters.
Solution:   Adjust the column computations. (Dominique Pelle)
2010-01-19 18:06:03 +01:00
Bram Moolenaar
e4ebd29ea9 updated for version 7.2.341
Problem:    Popup menu wraps to next line when double-wide character doesn't
            fit. (Jiang Ma)
Solution:   Display a ">" instead. (Dominique Pelle)
2010-01-19 17:40:46 +01:00
32 changed files with 394 additions and 138 deletions

1
.gitignore vendored
View File

@@ -28,6 +28,7 @@ src/auto/pathdef.c
*.res
*.RES
src/pathdef.c
src/Obj*/pathdef.c
gvimext.dll
gvimext.lib

View File

@@ -1,10 +1,15 @@
" Vim completion script
" Language: All languages, uses existing syntax highlighting rules
" Maintainer: David Fishburn <dfishburn.vim@gmail.com>
" Version: 4.0
" Last Change: Fri 26 Oct 2007 05:27:03 PM Eastern Daylight Time
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
" Version: 5.0
" Last Change: 2010 Jan 31
" Usage: For detailed help, ":help ft-syntax-omni"
" History
" Version 5.0
" When processing a list of syntax groups, the final group
" was missed in function SyntaxCSyntaxGroupItems.
"
" Set completion with CTRL-X CTRL-O to autoloaded function.
" This check is in place in case this script is
" sourced directly instead of using the autoload feature.
@@ -312,9 +317,13 @@ function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full )
" \zs - start the match
" .\{-} - everything ...
" \ze - end the match
" \( - start a group or 2 potential matches
" \n\w - at the first newline starting with a character
" \| - 2nd potential match
" \%$ - matches end of the file or string
" \) - end a group
let syntax_group = matchstr(a:syntax_full,
\ "\n".a:group_name.'\s\+xxx\s\+\zs.\{-}\ze'."\n".'\w'
\ "\n".a:group_name.'\s\+xxx\s\+\zs.\{-}\ze\(\n\w\|\%$\)'
\ )
if syntax_group != ""

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.2. Last change: 2010 Jan 05
*eval.txt* For Vim version 7.2. Last change: 2010 Jan 19
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*indent.txt* For Vim version 7.2. Last change: 2009 Nov 12
*indent.txt* For Vim version 7.2. Last change: 2010 Jan 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -437,7 +437,7 @@ assume a 'shiftwidth' of 4.
*N Vim searches for unclosed comments at most N lines away. This
limits the time needed to search for the start of a comment.
(default 30 lines).
(default 70 lines).
#N When N is non-zero recognize shell/Perl comments, starting with
'#'. Default N is zero: don't recognizes '#' comments. Note

View File

@@ -482,7 +482,7 @@ example: >
{shellpipe} is the 'shellpipe' option.
{errorfile} is the 'makeef' option, with ## replaced to make it unique.
The placeholder "$*" can be used for the argument list in {makeprog} if the
The placeholder "$*" can be used for the argument list in {makeprg} if the
command needs some additional characters after its arguments. The $* is
replaced then by all arguments. Example: >
:set makeprg=latex\ \\\\nonstopmode\ \\\\input\\{$*}
@@ -1212,7 +1212,7 @@ Maintaining the correct directory is more complicated if you don't use
GNU-make. AIX-make for example doesn't print any information about its
working directory. Then you need to enhance the makefile. In the makefile of
LessTif there is a command which echoes "Making {target} in {dir}". The
special problem here is that it doesn't print informations on leaving the
special problem here is that it doesn't print information on leaving the
directory and that it doesn't print the absolute path.
To solve the problem with relative paths and missing "leave directory"

View File

@@ -340,7 +340,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
this to get 'compatible', even though a .vimrc file exists.
Keep in mind that the command ":set nocompatible" in some
plugin or startup script overrules this, so you may end up
with 'nocmpatible' anyway. To find out, use: >
with 'nocompatible' anyway. To find out, use: >
:verbose set compatible?
< Several plugins won't work with 'compatible' set. You may
want to set it after startup this way: >

View File

@@ -6486,11 +6486,13 @@ mysql ft_sql.txt /*mysql*
mysyntaxfile syntax.txt /*mysyntaxfile*
mysyntaxfile-add syntax.txt /*mysyntaxfile-add*
mysyntaxfile-replace syntax.txt /*mysyntaxfile-replace*
mzeval() eval.txt /*mzeval()*
mzscheme if_mzsch.txt /*mzscheme*
mzscheme-buffer if_mzsch.txt /*mzscheme-buffer*
mzscheme-commands if_mzsch.txt /*mzscheme-commands*
mzscheme-dynamic if_mzsch.txt /*mzscheme-dynamic*
mzscheme-examples if_mzsch.txt /*mzscheme-examples*
mzscheme-mzeval if_mzsch.txt /*mzscheme-mzeval*
mzscheme-sandbox if_mzsch.txt /*mzscheme-sandbox*
mzscheme-threads if_mzsch.txt /*mzscheme-threads*
mzscheme-vim if_mzsch.txt /*mzscheme-vim*

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.2. Last change: 2010 Jan 14
*todo.txt* For Vim version 7.2. Last change: 2010 Feb 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,49 +30,39 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
Patch from Dominique Pelle, documentation fixes. (2010 Jan 9)
Another patch for README files.
Patch for crash in netbeans on join command. (Xavier de Gaye, 2010 Feb 5)
Patch from Dominique Pelle for buffer reload when fixing spell mistake.
(2010 Jan 14)
Patch for mzscheme docs. (Sergey Khorev, 2010 Jan 29)
Extention for MzScheme interface. (Sergey Khorev, 2009 Dec 21, update Dec 26)
Patch to support netbeans in Unix console Vim. (Xavier de Gaye, 2009 Apr 26)
Now with Mercurial repository (2010 Jan 2)
patch from Sergey Khorev for "*" command escaping. (2010 Jan 5)
Warnings for Python 2.6.4. (Dominique Pelle, 2010 Jan 31)
Patch: :compiler command doesn't function properly when invoked in a function
(Yukihiro Nakadaira)
Patch for better fix for Win64. (Sergey Khorev, 2010 Feb 4)
Patch for error messages. (Dominique Pelle, 2010 Feb 5)
Patch for visual-operators text (Dominique Pelle, 2010 Feb 6)
Patch for Win64 MingW struct size. (Andy Kittner, 2010 Feb 7)
Patch for Perl interface with Perl 5.10. (Sergey Khorev, 2010 Feb 5)
Patch for xxd to support "-r -p" as documented. (James Vega, 2010 Feb 8)
Win32: patch for cross compile xxd and GvimExt. (Markus Heidelberg, 2009 Mar
18) Also update INSTALLpc.txt?
Patch for xxd/Make_cyg.mak. (Chris Sutcliffe, 2009 Jun 10) Included in the
above?
iconv() doesn't fail on an illegal character, as documented. (Yongwei Wu, 2009
Nov 15, example Nov 26) Add argument to specify whether iconv() should fail
or replace with a character and continue?
Problem with window jumping to other screen when changing font. (patch by
Michael Wookey, 2009 Oct 16)
Better: if the window offset was negative before changing something, then
don't change it.
Patch to make CTRL-] work on scheme keywords. (Sergey Khorev, 2010 Jan 5)
Gcc warning for condition that can never be true, fold.c line 3242. (James
Vega, 2010 Jan 13)
Omni menu position one column too far to the right, double-wide chars split to
next line. (Jiang Ma, 2010 Jan 10)
Explicit example from Dominique.
Need to check that the last character fits?
Patch from Dominique Pelle. (2010 Jan 12) One more (2010 Jan 12)
has("win64") returns zero. Patch from Sergey Khorev, 2009 Jan 5.
Or define WIN64 when _WIN64 is defined, change all _WIN64 to WIN64.
Add local time at start of --startuptime output.
Requires configure check for localtime().
Use format year-month-day hr:min:sec.
Patch to support netbeans in Unix console Vim. (Xaview de Gaye, 2009 Apr 26)
Now with Mercurial repository (2010 Jan 2)
Shell not recognized properly if it ends in "csh -f". (James Vega, 2009 Nov 3)
Find tail? Might have a / in argument. Find space? Might have space in
path.
@@ -177,7 +167,7 @@ Problem with <script> mappings (Andy Wokula, 2009 Mar 8)
Patch to support netbeans for Mac. (Kazuki Sakamoto, 2009 Jun 25)
Patch to support clibpoard for Mac terminal. (Jjgod Jiang, 2009 Aug 1)
Patch to support clipboard for Mac terminal. (Jjgod Jiang, 2009 Aug 1)
When starting Vim with "gvim -f -u non_existent_file > foo.txt" there are a
few control characters in the output. (Dale Wiles, 2009 May 28)
@@ -191,6 +181,7 @@ J. Wang, 2009 Mar 31)
Patch for vertical line at certain column position, 'guidecolumn' option.
(Pankaj Garg, 2009 Apr 14, aka Lone, Apr 15)
Update 2009 May 2, 'margincolumn'
Alternative patch. (2010 Feb 2, Gregor Uhlenheuer)
Add different highlighting for a fold line depending on the fold level.
Patch. (Noel Henson, 2009 Sep 13)
@@ -258,11 +249,6 @@ Kondakoff, 2009 May 13)
Win32 GUI: Changing manifest helps for dpi changes (Joe Castro, 2009 Mar 27)
Win32: patch for cross compile xxd and GvimExt. (Markus Heidelberg, 2009 Mar
18) Also update INSTALLpc.txt?
Patch for xxd/Make_cyg.mak. (Chris Sutcliffe, 2009 Jun 10) Included in the
above?
Win32: patch for better font scaling. (George Reilly, 2009 Mar 26)
Win32 GUI: last message from startup doesn't show up when there is an echoerr
@@ -856,6 +842,9 @@ When 'backupskip' is set from $TEMP special characters need to be escaped.
Another problem is that file_pat_to_reg_pat() doesn't recognize "\\", so "\\("
will be seen as a path separator plus "\(".
gvim d:\path\path\(FILE).xml should not remove the \ before the (.
This also fails with --remote.
When doing ":quit" the Netbeans "killed" event isn't sent. (Xavier de Gaye,
2008 Nov 10) call netbeans_file_closed() at the end of buf_freeall(), or in
all places where buf_freeall() is called?
@@ -920,7 +909,7 @@ Win32: When 'autochdir' is on and 'encoding' is changed, files on the command
line are opened again, but from the wrong directory. Apply 'autochdir' only
after starting up?
When showing a diff between a non-existant file and an existing one, with the
When showing a diff between a non-existent file and an existing one, with the
cursor in the empty buffer, the other buffer only shows the last line. Change
the "insert" into a change from one line to many? (Yakov Lerner, 2008 May 27)
@@ -1046,7 +1035,7 @@ visible.
GTK: when setting 'columns' in a startup script and doing ":vertical diffsplit"
the window isn't redrawn properly, see two vertical bars.
GTK: file choser is disabled. Patch by Tim Starling, 2009 Nov 13.
GTK: file chooser is disabled. Patch by Tim Starling, 2009 Nov 13.
The magic clipboard format "VimClipboard2" appears in several places. Should
be only one.
@@ -2315,7 +2304,7 @@ Spell checking:
Is COMPLEXPREFIXES necessary when we have flags for affixes?
- Support spelling words in CamelCase as if they were two separate words.
Requires some option to enable it. (Timothy Knox)
- There is no Finnish spell checking file. For openoffic Voikko is now
- There is no Finnish spell checking file. For openoffice Voikko is now
used, which is based on Malaga: http://home.arcor.de/bjoern-beutel/malaga/
(Teemu Likonen)
8 ":mkspell" still takes much too long in Hungarian dictionary from

View File

@@ -11170,7 +11170,7 @@ Files: runtime/doc/help.txt, runtime/doc/sponsor.txt, runtime/doc/tags,
runtime/menu.vim, src/version.c
Patch 6.2.192
Problem: Using CTRL-T and CTRL-D with "gR" messes up the text. (Jonahtan
Problem: Using CTRL-T and CTRL-D with "gR" messes up the text. (Jonathan
Hankins)
Solution: Avoid calling change_indent() recursively.
Files: src/edit.c

View File

@@ -4734,7 +4734,7 @@ New keymap files:
Other new runtime files:
Esperanto menu and message translations. (Dominique Pelle)
Finnish menu and message translations. (Flammie Pirinen)
Brazilian Portugese message translations. (Eduardo Dobay)
Brazilian Portuguese message translations. (Eduardo Dobay)
Added floating point support. |Float|
@@ -4925,7 +4925,7 @@ Files: src/fileio.c, src/os_unix.h
Patch 7.1.028
Problem: Can't use last search pattern for ":sort". (Brian McKee)
Solution: When the pattern is emtpy use the last search pattern. (Martin
Solution: When the pattern is empty use the last search pattern. (Martin
Toft)
Files: runtime/doc/change.txt, src/ex_cmds.c
@@ -5463,7 +5463,7 @@ Solution: Remove the replacement with a question mark when UNICODE16 is not
Files: src/screen.c
Patch 7.1.117
Problem: Can't check wether Vim was compiled with Gnome. (Tony Mechelynck)
Problem: Can't check whether Vim was compiled with Gnome. (Tony Mechelynck)
Solution: Add gui_gnome to the has() list.
Files: src/eval.c

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: indent(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2007-06-17
" Latest Revision: 2010-01-23
" indent_is_bsd: If exists, will change somewhat to match BSD implementation
"
" TODO: is the deny-all (a la lilo.vim nice or no?)...
@@ -27,7 +27,7 @@ syn region indentComment start='//' skip='\\$' end='$'
\ contains=indentTodo,@Spell
if !exists("indent_is_bsd")
syn match indentOptions '-i\|--indentation-level'
syn match indentOptions '-i\|--indentation-level\|-il\|--indent-level'
\ nextgroup=indentNumber skipwhite skipempty
endif
syn match indentOptions '-\%(bli\|c\%([bl]i\|[dip]\)\=\|di\=\|ip\=\|lc\=\|pp\=i\|sbi\|ts\|-\%(brace-indent\|comment-indentation\|case-brace-indentation\|declaration-comment-column\|continuation-indentation\|case-indentation\|else-endif-column\|line-comments-indentation\|declaration-indentation\|indent-level\|parameter-indentation\|line-length\|comment-line-length\|paren-indentation\|preprocessor-indentation\|struct-brace-indentation\|tab-size\)\)'
@@ -123,6 +123,7 @@ syn keyword indentOptions -bacc --blank-lines-after-ifdefs
\ -ut --use-tabs
\ -v --verbose
\ -version --version
\ -linux --linux-style
if exists("indent_is_bsd")
syn keyword indentOptions -ip -ei -nei

View File

@@ -1,8 +1,8 @@
" Vim syntax file
" Language: lilo configuration (lilo.conf)
" Maintainer: help wanted!
" Maintainer: Niels Horn <niels.horn@gmail.com>
" Previous Maintainer: David Necas (Yeti) <yeti@physics.muni.cz>
" Last Change: 2009-01-27
" Last Change: 2010-02-03
" Setup
if version >= 600

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: reStructuredText documentation format
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2009-05-25
" Latest Revision: 2010-01-23
if exists("b:current_syntax")
finish
@@ -137,7 +137,7 @@ syn match rstStandaloneHyperlink contains=@NoSpell
" TODO: Use better syncing. I dont know the specifics of syncing well enough,
" though.
syn sync minlines=50
syn sync minlines=50 linebreaks=1
hi def link rstTodo Todo
hi def link rstComment Comment

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Zsh shell script
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-17
" Latest Revision: 2010-01-23
if exists("b:current_syntax")
finish
@@ -14,7 +14,7 @@ setlocal iskeyword+=-
syn keyword zshTodo contained TODO FIXME XXX NOTE
syn region zshComment display oneline start='\%(^\|\s\)#' end='$'
syn region zshComment oneline start='\%(^\|\s\)#' end='$'
\ contains=zshTodo,@Spell
syn match zshPreProc '^\%1l#\%(!\|compdef\|autoload\).*$'

View File

@@ -187,16 +187,27 @@ func! BuildCombiningTable()
wincmd p
endfunc
" Build the ambiguous table in a new buffer.
" Build the double width or ambiguous width table in a new buffer.
" Uses s:widthprops and s:dataprops.
func! BuildAmbiguousTable()
func! BuildWidthTable(pattern, tableName)
let start = -1
let end = -1
let ranges = []
let dataidx = 0
for p in s:widthprops
if p[1][0] == 'A'
let n = ('0x' . p[0]) + 0
if p[1][0] =~ a:pattern
if p[0] =~ '\.\.'
" It is a range. we don't check for composing char then.
let rng = split(p[0], '\.\.')
if len(rng) != 2
echoerr "Cannot parse range: '" . p[0] . "' in width table"
endif
let n = ('0x' . rng[0]) + 0
let n_last = ('0x' . rng[1]) + 0
else
let n = ('0x' . p[0]) + 0
let n_last = n
endif
" Find this char in the data table.
while 1
let dn = ('0x' . s:dataprops[dataidx][0]) + 0
@@ -205,27 +216,23 @@ func! BuildAmbiguousTable()
endif
let dataidx += 1
endwhile
if dn != n
if dn != n && n_last == n
echoerr "Cannot find character " . n . " in data table"
endif
" Only use the char when it's not a composing char.
" But use all chars from a range.
let dp = s:dataprops[dataidx]
if dp[2] != 'Mn' && dp[2] != 'Mc' && dp[2] != 'Me'
if n_last > n || (dp[2] != 'Mn' && dp[2] != 'Mc' && dp[2] != 'Me')
if start >= 0 && end + 1 == n
" continue with same range.
let end = n
else
if start >= 0
" produce previous range
call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end))
endif
let start = n
if p[0] =~ '\.\.'
let end = ('0x' . substitute(p[0], '.*\.\.', '', '')) + 0
else
let end = n
endif
endif
let end = n_last
endif
endif
endfor
@@ -235,8 +242,8 @@ func! BuildAmbiguousTable()
" New buffer to put the result in.
new
file ambiguous
call setline(1, " static struct interval ambiguous[] =")
exe "file " . a:tableName
call setline(1, " static struct interval " . a:tableName . "[] =")
call setline(2, " {")
call append('$', ranges)
call setline('$', getline('$')[:-2]) " remove last comma
@@ -276,5 +283,8 @@ edit http://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt
" Parse each line, create a list of lists.
call ParseWidthProps()
" Build the ambiguous table.
call BuildAmbiguousTable()
" Build the double width table.
call BuildWidthTable('[WF]', 'doublewidth')
" Build the ambiguous width table.
call BuildWidthTable('A', 'ambiguous')

View File

@@ -1115,6 +1115,79 @@ ex_profile(eap)
}
}
/* Command line expansion for :profile. */
static enum
{
PEXP_SUBCMD, /* expand :profile sub-commands */
PEXP_FUNC, /* expand :profile func {funcname} */
} pexpand_what;
static char *pexpand_cmds[] = {
"start",
#define PROFCMD_START 0
"pause",
#define PROFCMD_PAUSE 1
"continue",
#define PROFCMD_CONTINUE 2
"func",
#define PROFCMD_FUNC 3
"file",
#define PROFCMD_FILE 4
NULL
#define PROFCMD_LAST 5
};
/*
* Function given to ExpandGeneric() to obtain the profile command
* specific expansion.
*/
char_u *
get_profile_name(xp, idx)
expand_T *xp UNUSED;
int idx;
{
switch (pexpand_what)
{
case PEXP_SUBCMD:
return (char_u *)pexpand_cmds[idx];
/* case PEXP_FUNC: TODO */
default:
return NULL;
}
}
/*
* Handle command line completion for :profile command.
*/
void
set_context_in_profile_cmd(xp, arg)
expand_T *xp;
char_u *arg;
{
char_u *end_subcmd;
int len;
/* Default: expand subcommands. */
xp->xp_context = EXPAND_PROFILE;
pexpand_what = PEXP_SUBCMD;
xp->xp_pattern = arg;
end_subcmd = skiptowhite(arg);
if (*end_subcmd == NUL)
return;
len = end_subcmd - arg;
if (len == 5 && STRNCMP(arg, "start", 5) == 0)
{
xp->xp_context = EXPAND_FILES;
xp->xp_pattern = skipwhite(end_subcmd);
return;
}
/* TODO: expand function names after "func" */
xp->xp_context = EXPAND_NOTHING;
}
/*
* Dump the profiling info.
*/
@@ -2814,11 +2887,11 @@ static FILE *fopen_noinh_readbin __ARGS((char *filename));
fopen_noinh_readbin(filename)
char *filename;
{
int fd_tmp = mch_open(filename, O_RDONLY
# ifdef WIN32
O_BINARY | O_NOINHERIT
int fd_tmp = mch_open(filename, O_RDONLY | O_BINARY | O_NOINHERIT, 0);
# else
int fd_tmp = mch_open(filename, O_RDONLY, 0);
# endif
, 0);
if (fd_tmp == -1)
return NULL;

View File

@@ -3804,6 +3804,11 @@ set_one_cmd_context(xp, buff)
xp->xp_context = EXPAND_NOTHING;
break;
#endif
#if defined(FEAT_PROFILE)
case CMD_profile:
set_context_in_profile_cmd(xp, arg);
break;
#endif
#endif /* FEAT_CMDL_COMPL */

View File

@@ -4522,6 +4522,9 @@ ExpandFromContext(xp, pat, num_file, file, options)
#ifdef FEAT_SIGNS
{EXPAND_SIGN, get_sign_name, TRUE},
#endif
#ifdef FEAT_PROFILE
{EXPAND_PROFILE, get_profile_name, TRUE},
#endif
#if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
&& (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE))
{EXPAND_LANGUAGE, get_lang_arg, TRUE},

View File

@@ -849,11 +849,17 @@ foldUpdate(wp, top, bot)
fold_T *fp;
/* Mark all folds from top to bot as maybe-small. */
(void)foldFind(&curwin->w_folds, curwin->w_cursor.lnum, &fp);
(void)foldFind(&curwin->w_folds, top, &fp);
while (fp < (fold_T *)curwin->w_folds.ga_data + curwin->w_folds.ga_len
&& fp->fd_top < bot)
{
fp->fd_small = MAYBE;
/* Not sure if this is the right place to reset fd_flags (suggested by
* Lech Lorens). */
if (wp->w_foldinvalid)
fp->fd_flags = FD_LEVEL;
++fp;
}

View File

@@ -2389,6 +2389,17 @@ vgetorpeek(advance)
/* complete match */
if (keylen >= 0 && keylen <= typebuf.tb_len)
{
#ifdef FEAT_EVAL
int save_m_expr;
int save_m_noremap;
int save_m_silent;
char_u *save_m_keys;
char_u *save_m_str;
#else
# define save_m_noremap mp->m_noremap
# define save_m_silent mp->m_silent
#endif
/* write chars to script file(s) */
if (keylen > typebuf.tb_maplen)
gotchars(typebuf.tb_buf + typebuf.tb_off
@@ -2431,6 +2442,16 @@ vgetorpeek(advance)
#endif
#ifdef FEAT_EVAL
/* Copy the values from *mp that are used, because
* evaluating the expression may invoke a function
* that redefines the mapping, thereby making *mp
* invalid. */
save_m_expr = mp->m_expr;
save_m_noremap = mp->m_noremap;
save_m_silent = mp->m_silent;
save_m_keys = NULL; /* only saved when needed */
save_m_str = NULL; /* only saved when needed */
/*
* Handle ":map <expr>": evaluate the {rhs} as an
* expression. Save and restore the typeahead so that
@@ -2446,7 +2467,9 @@ vgetorpeek(advance)
if (tabuf.typebuf_valid)
{
vgetc_busy = 0;
s = eval_map_expr(mp->m_str, NUL);
save_m_keys = vim_strsave(mp->m_keys);
save_m_str = vim_strsave(mp->m_str);
s = eval_map_expr(save_m_str, NUL);
vgetc_busy = save_vgetc_busy;
}
else
@@ -2469,18 +2492,33 @@ vgetorpeek(advance)
i = FAIL;
else
{
i = ins_typebuf(s,
mp->m_noremap != REMAP_YES
? mp->m_noremap
: STRNCMP(s, mp->m_keys,
(size_t)keylen) != 0
? REMAP_YES : REMAP_SKIP,
0, TRUE, cmd_silent || mp->m_silent);
int noremap;
if (save_m_noremap != REMAP_YES)
noremap = save_m_noremap;
else if (
#ifdef FEAT_EVAL
if (mp->m_expr)
STRNCMP(s, save_m_keys != NULL
? save_m_keys : mp->m_keys,
(size_t)keylen)
#else
STRNCMP(s, mp->m_keys, (size_t)keylen)
#endif
!= 0)
noremap = REMAP_YES;
else
noremap = REMAP_SKIP;
i = ins_typebuf(s, noremap,
0, TRUE, cmd_silent || save_m_silent);
#ifdef FEAT_EVAL
if (save_m_expr)
vim_free(s);
#endif
}
#ifdef FEAT_EVAL
vim_free(save_m_keys);
vim_free(save_m_str);
#endif
if (i == FAIL)
{
c = -1;

View File

@@ -1390,6 +1390,7 @@ gui_set_shellsize(mustset, fit_to_display, direction)
int un_maximize = mustset;
int did_adjust = 0;
#endif
int x = -1, y = -1;
if (!gui.shell_created)
return;
@@ -1406,6 +1407,10 @@ gui_set_shellsize(mustset, fit_to_display, direction)
base_width = gui_get_base_width();
base_height = gui_get_base_height();
if (fit_to_display)
/* Remember the original window position. */
gui_mch_get_winpos(&x, &y);
#ifdef USE_SUN_WORKSHOP
if (!mustset && usingSunWorkShop
&& workshop_get_width_height(&width, &height))
@@ -1473,11 +1478,12 @@ gui_set_shellsize(mustset, fit_to_display, direction)
gui_mch_set_shellsize(width, height, min_width, min_height,
base_width, base_height, direction);
if (fit_to_display)
{
int x, y;
/* Some window managers put the Vim window left of/above the screen. */
if (fit_to_display && x >= 0 && y >= 0)
{
/* Some window managers put the Vim window left of/above the screen.
* Only change the position if it wasn't already negative before
* (happens on MS-Windows with a secondary monitor). */
gui_mch_update();
if (gui_mch_get_winpos(&x, &y) == OK && (x < 0 || y < 0))
gui_mch_set_winpos(x < 0 ? 0 : x, y < 0 ? 0 : y);

View File

@@ -1084,9 +1084,15 @@ _TextAreaWndProc(
case WM_NOTIFY: Handle_WM_Notify(hwnd, (LPNMHDR)lParam);
return TRUE;
#endif
/* Workaround for the problem that MyWindowProc() returns FALSE on 64
* bit windows when cross-compiled using Mingw libraries. (Andy
* Kittner) */
case WM_NCCREATE:
MyWindowProc(hwnd, uMsg, wParam, lParam);
return TRUE;
default:
return MyWindowProc(hwnd, uMsg, wParam, lParam);
default:
return MyWindowProc(hwnd, uMsg, wParam, lParam);
}
}

View File

@@ -1200,6 +1200,49 @@ intable(table, size, c)
utf_char2cells(c)
int c;
{
/* Sorted list of non-overlapping intervals of East Asian double width
* characters, generated with ../runtime/tools/unicode.vim. */
static struct interval doublewidth[] =
{
{0x1100, 0x115f},
{0x11a3, 0x11a7},
{0x11fa, 0x11ff},
{0x2329, 0x232a},
{0x2e80, 0x2e99},
{0x2e9b, 0x2ef3},
{0x2f00, 0x2fd5},
{0x2ff0, 0x2ffb},
{0x3000, 0x3029},
{0x3030, 0x303e},
{0x3041, 0x3096},
{0x309b, 0x30ff},
{0x3105, 0x312d},
{0x3131, 0x318e},
{0x3190, 0x31b7},
{0x31c0, 0x31e3},
{0x31f0, 0x321e},
{0x3220, 0x3247},
{0x3250, 0x32fe},
{0x3300, 0x4dbf},
{0x4e00, 0xa48c},
{0xa490, 0xa4c6},
{0xa960, 0xa97c},
{0xac00, 0xd7a3},
{0xd7b0, 0xd7c6},
{0xd7cb, 0xd7fb},
{0xf900, 0xfaff},
{0xfe10, 0xfe19},
{0xfe30, 0xfe52},
{0xfe54, 0xfe66},
{0xfe68, 0xfe6b},
{0xff01, 0xff60},
{0xffe0, 0xffe6},
{0x1f200, 0x1f200},
{0x1f210, 0x1f231},
{0x1f240, 0x1f248},
{0x20000, 0x2fffd},
{0x30000, 0x3fffd}
};
/* Sorted list of non-overlapping intervals of East Asian Ambiguous
* characters, generated with ../runtime/tools/unicode.vim. */
static struct interval ambiguous[] =
@@ -1403,20 +1446,7 @@ utf_char2cells(c)
#else
if (!utf_printable(c))
return 6; /* unprintable, displays <xxxx> */
if (c >= 0x1100
&& (c <= 0x115f /* Hangul Jamo */
|| c == 0x2329
|| c == 0x232a
|| (c >= 0x2e80 && c <= 0xa4cf
&& c != 0x303f) /* CJK ... Yi */
|| (c >= 0xac00 && c <= 0xd7a3) /* Hangul Syllables */
|| (c >= 0xf900 && c <= 0xfaff) /* CJK Compatibility
Ideographs */
|| (c >= 0xfe30 && c <= 0xfe6f) /* CJK Compatibility Forms */
|| (c >= 0xff00 && c <= 0xff60) /* Fullwidth Forms */
|| (c >= 0xffe0 && c <= 0xffe6)
|| (c >= 0x20000 && c <= 0x2fffd)
|| (c >= 0x30000 && c <= 0x3fffd)))
if (intable(doublewidth, sizeof(doublewidth), c))
return 2;
#endif
}

View File

@@ -889,6 +889,7 @@ validate_cursor_col()
{
colnr_T off;
colnr_T col;
int width;
validate_virtcol();
if (!(curwin->w_valid & VALID_WCOL))
@@ -896,15 +897,14 @@ validate_cursor_col()
col = curwin->w_virtcol;
off = curwin_col_off();
col += off;
width = W_WIDTH(curwin) - off + curwin_col_off2();
/* long line wrapping, adjust curwin->w_wrow */
if (curwin->w_p_wrap
&& col >= (colnr_T)W_WIDTH(curwin)
&& W_WIDTH(curwin) - off + curwin_col_off2() > 0)
{
col -= W_WIDTH(curwin);
col = col % (W_WIDTH(curwin) - off + curwin_col_off2());
}
&& width > 0)
/* use same formula as what is used in curs_columns() */
col -= ((col - W_WIDTH(curwin)) / width + 1) * width;
if (col > (int)curwin->w_leftcol)
col -= curwin->w_leftcol;
else
@@ -1041,6 +1041,7 @@ curs_columns(scroll)
/* long line wrapping, adjust curwin->w_wrow */
if (curwin->w_wcol >= W_WIDTH(curwin))
{
/* this same formula is used in validate_cursor_col() */
n = (curwin->w_wcol - W_WIDTH(curwin)) / width + 1;
curwin->w_wcol -= n * width;
curwin->w_wrow += n;

View File

@@ -1301,10 +1301,16 @@ put_reedit_in_typebuf(silent)
}
}
/*
* Insert register contents "s" into the typeahead buffer, so that it will be
* executed again.
* When "esc" is TRUE it is to be taken literally: Escape CSI characters and
* no remapping.
*/
static int
put_in_typebuf(s, esc, colon, silent)
char_u *s;
int esc; /* Escape CSI characters */
int esc;
int colon; /* add ':' before the line */
int silent;
{
@@ -1312,7 +1318,7 @@ put_in_typebuf(s, esc, colon, silent)
put_reedit_in_typebuf(silent);
if (colon)
retval = ins_typebuf((char_u *)"\n", REMAP_YES, 0, TRUE, silent);
retval = ins_typebuf((char_u *)"\n", REMAP_NONE, 0, TRUE, silent);
if (retval == OK)
{
char_u *p;
@@ -1324,12 +1330,13 @@ put_in_typebuf(s, esc, colon, silent)
if (p == NULL)
retval = FAIL;
else
retval = ins_typebuf(p, REMAP_YES, 0, TRUE, silent);
retval = ins_typebuf(p, esc ? REMAP_NONE : REMAP_YES,
0, TRUE, silent);
if (esc)
vim_free(p);
}
if (colon && retval == OK)
retval = ins_typebuf((char_u *)":", REMAP_YES, 0, TRUE, silent);
retval = ins_typebuf((char_u *)":", REMAP_NONE, 0, TRUE, silent);
return retval;
}

View File

@@ -5867,6 +5867,10 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
#endif
/* update flag in swap file */
ml_setflags(curbuf);
/* Redraw needed when switching to/from "mac": a CR in the text
* will be displayed differently. */
if (get_fileformat(curbuf) == EOL_MAC || *oldval == 'm')
redraw_curbuf_later(NOT_VALID);
}
}
@@ -6410,6 +6414,9 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
}
# endif
curbuf->b_help = (curbuf->b_p_bt[0] == 'h');
# ifdef FEAT_TITLE
redraw_titles();
# endif
}
}
#endif

View File

@@ -345,21 +345,36 @@ pum_redraw()
if (st != NULL)
{
char_u *rt = reverse_text(st);
char_u *rt_saved = rt;
int len, j;
if (rt != NULL)
{
len = (int)STRLEN(rt);
if (len > pum_width)
char_u *rt_start = rt;
int size;
size = vim_strsize(rt);
if (size > pum_width)
{
for (j = pum_width; j < len; ++j)
do
{
size -= has_mbyte
? (*mb_ptr2cells)(rt) : 1;
mb_ptr_adv(rt);
len = pum_width;
} while (size > pum_width);
if (size < pum_width)
{
/* Most left character requires
* 2-cells but only 1 cell is
* available on screen. Put a
* '<' on the left of the pum
* item */
*(--rt) = '<';
size++;
}
}
screen_puts_len(rt, len, row,
col - len + 1, attr);
vim_free(rt_saved);
screen_puts_len(rt, (int)STRLEN(rt),
row, col - size + 1, attr);
vim_free(rt_start);
}
vim_free(st);
}

View File

@@ -24,6 +24,8 @@ void profile_sub_wait __ARGS((proftime_T *tm, proftime_T *tma));
int profile_equal __ARGS((proftime_T *tm1, proftime_T *tm2));
int profile_cmp __ARGS((proftime_T *tm1, proftime_T *tm2));
void ex_profile __ARGS((exarg_T *eap));
char_u *get_profile_name __ARGS((expand_T *xp, int idx));
void set_context_in_profile_cmd __ARGS((expand_T *xp, char_u *arg));
void profile_dump __ARGS((void));
void script_prof_save __ARGS((proftime_T *tm));
void script_prof_restore __ARGS((proftime_T *tm));

View File

@@ -2335,13 +2335,12 @@ fold_line(wp, fold_count, foldinfo, lnum, row)
if (cells > 1)
ScreenLines[idx + 1] = 0;
}
else if (cells > 1) /* double-byte character */
{
if (enc_dbcs == DBCS_JPNU && *p == 0x8e)
ScreenLines2[idx] = p[1];
else
ScreenLines[idx + 1] = p[1];
}
else if (enc_dbcs == DBCS_JPNU && *p == 0x8e)
/* double-byte single width character */
ScreenLines2[idx] = p[1];
else if (cells > 1)
/* double-width character */
ScreenLines[idx + 1] = p[1];
col += cells;
idx += cells;
p += c_len;
@@ -4631,7 +4630,11 @@ win_line(wp, lnum, startrow, endrow, nochange)
ScreenLines[off] = c;
#ifdef FEAT_MBYTE
if (enc_dbcs == DBCS_JPNU)
{
if ((mb_c & 0xff00) == 0x8e00)
ScreenLines[off] = 0x8e;
ScreenLines2[off] = mb_c & 0xff;
}
else if (enc_utf8)
{
if (mb_utf8)
@@ -6434,6 +6437,13 @@ screen_puts_len(text, len, row, col, attr)
else
prev_c = u8c;
# endif
if (col + mbyte_cells > screen_Columns)
{
/* Only 1 cell left, but character requires 2 cells:
* display a '>' in the last column to avoid wrapping. */
c = '>';
mbyte_cells = 1;
}
}
}
#endif
@@ -9210,7 +9220,7 @@ unshowmode(force)
int force;
{
/*
* Don't delete it right now, when not redrawing or insided a mapping.
* Don't delete it right now, when not redrawing or inside a mapping.
*/
if (!redrawing() || (!force && char_avail() && !KeyTyped))
redraw_cmdline = TRUE; /* delete mode later */

View File

@@ -681,6 +681,40 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
357,
/**/
356,
/**/
355,
/**/
354,
/**/
353,
/**/
352,
/**/
351,
/**/
350,
/**/
349,
/**/
348,
/**/
347,
/**/
346,
/**/
345,
/**/
344,
/**/
343,
/**/
342,
/**/
341,
/**/
340,
/**/

View File

@@ -718,6 +718,7 @@ extern char *(*dyn_libintl_textdomain)(const char *domainname);
#define EXPAND_SHELLCMD 32
#define EXPAND_CSCOPE 33
#define EXPAND_SIGN 34
#define EXPAND_PROFILE 35
/* Values for exmode_active (0 is no exmode) */
#define EXMODE_NORMAL 1

View File

@@ -626,7 +626,7 @@ wingotofile:
#ifdef FEAT_SEARCHPATH
case 'f': /* CTRL-W gf: "gf" in a new tab page */
case 'F': /* CTRL-W gF: "gF" in a new tab page */
cmdmod.tab = TRUE;
cmdmod.tab = tabpage_index(curtab) + 1;
nchar = xchar;
goto wingotofile;
#endif