mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Merge remote-tracking branch 'vim/master'
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.0. Last change: 2017 Dec 01
|
||||
*options.txt* For Vim version 8.0. Last change: 2017 Dec 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -5910,11 +5910,11 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
copy of the original file will be kept. The name of the copy is the
|
||||
name of the original file with the string in the 'patchmode' option
|
||||
appended. This option should start with a dot. Use a string like
|
||||
".org". 'backupdir' must not be empty for this to work (Detail: The
|
||||
backup file is renamed to the patchmode file after the new file has
|
||||
been successfully written, that's why it must be possible to write a
|
||||
backup file). If there was no file to be backed up, an empty file is
|
||||
created.
|
||||
".orig" or ".org". 'backupdir' must not be empty for this to work
|
||||
(Detail: The backup file is renamed to the patchmode file after the
|
||||
new file has been successfully written, that's why it must be possible
|
||||
to write a backup file). If there was no file to be backed up, an
|
||||
empty file is created.
|
||||
When the 'backupskip' pattern matches, a patchmode file is not made.
|
||||
Using 'patchmode' for compressed files appends the extension at the
|
||||
end (e.g., "file.gz.orig"), thus the resulting name isn't always
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 8.0. Last change: 2017 Sep 30
|
||||
*syntax.txt* For Vim version 8.0. Last change: 2017 Dec 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -5031,6 +5031,8 @@ TabLine tab pages line, not active tab page label
|
||||
TabLineFill tab pages line, where there are no labels
|
||||
*hl-TabLineSel*
|
||||
TabLineSel tab pages line, active tab page label
|
||||
*hl-Terminal*
|
||||
Terminal |terminal| window (see |terminal-size-color|)
|
||||
*hl-Title*
|
||||
Title titles for output from ":set all", ":autocmd" etc.
|
||||
*hl-Visual*
|
||||
|
||||
@@ -6893,6 +6893,7 @@ hl-StatusLineNC syntax.txt /*hl-StatusLineNC*
|
||||
hl-TabLine syntax.txt /*hl-TabLine*
|
||||
hl-TabLineFill syntax.txt /*hl-TabLineFill*
|
||||
hl-TabLineSel syntax.txt /*hl-TabLineSel*
|
||||
hl-Terminal syntax.txt /*hl-Terminal*
|
||||
hl-Title syntax.txt /*hl-Title*
|
||||
hl-Tooltip syntax.txt /*hl-Tooltip*
|
||||
hl-User1 syntax.txt /*hl-User1*
|
||||
@@ -8164,6 +8165,7 @@ quake.vim syntax.txt /*quake.vim*
|
||||
quickfix quickfix.txt /*quickfix*
|
||||
quickfix-6 version6.txt /*quickfix-6*
|
||||
quickfix-ID quickfix.txt /*quickfix-ID*
|
||||
quickfix-changedtick quickfix.txt /*quickfix-changedtick*
|
||||
quickfix-context quickfix.txt /*quickfix-context*
|
||||
quickfix-directory-stack quickfix.txt /*quickfix-directory-stack*
|
||||
quickfix-error-lists quickfix.txt /*quickfix-error-lists*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*terminal.txt* For Vim version 8.0. Last change: 2017 Dec 17
|
||||
*terminal.txt* For Vim version 8.0. Last change: 2017 Dec 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -122,7 +122,8 @@ and background colors are taken from Vim, the Normal highlight group.
|
||||
For a color terminal the 'background' option is used to decide whether the
|
||||
terminal window will start with a white or black background.
|
||||
|
||||
To use a different color the Terminal highlight group can be used: >
|
||||
To use a different color the Terminal highlight group can be used, for
|
||||
example: >
|
||||
hi Terminal ctermbg=lightgrey ctermfg=blue guibg=lightgrey guifg=blue
|
||||
|
||||
|
||||
|
||||
+24
-18
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.0. Last change: 2017 Dec 17
|
||||
*todo.txt* For Vim version 8.0. Last change: 2017 Dec 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -142,11 +142,19 @@ Suggested by Hiroki Kokubun:
|
||||
Include solarized color scheme?, it does not support termguicolors.
|
||||
- Sanitized version of pablo (Lifepillar, 2017 Nov 21)
|
||||
|
||||
heap use after free. (gy741, #2447)
|
||||
heap use after free in set_bufref (gy741, #2448)
|
||||
reproduces with valgrind (Dominique)
|
||||
heap use after free in getout. (gy741, #2449)
|
||||
reproduces with valgrind (Dominique)
|
||||
Reproducible:
|
||||
invalid memory access in regexp with zero-width.
|
||||
reproduced by Dominique, 2017 Dec 23
|
||||
heap-use-after-free in win_equal_rec (#2467)
|
||||
au* 0 vs¡
|
||||
ar0
|
||||
arga
|
||||
al
|
||||
al
|
||||
|
||||
Errors found with random data:
|
||||
heap-buffer-overflow in alist_add (#2472)
|
||||
heap-buffer-overflow in del_bytes (#2466)
|
||||
|
||||
Compiler warnings (geeknik, 2017 Oct 26):
|
||||
- signed integer overflow in do_sub() (#2249)
|
||||
@@ -155,20 +163,13 @@ Compiler warnings (geeknik, 2017 Oct 26):
|
||||
- signed integer overflow in nfa_regatom() (#2251)
|
||||
- undefined left shift in get_string_tv() (#2250)
|
||||
|
||||
Triggering CursorHoldI happens too often in the GUI. (#2451).
|
||||
Should move code from os_unix.c mch_inchar() up into common use, it's not
|
||||
really machine specific. Also the part of WaitForChar(), it deals with timers
|
||||
and is also for all machines.
|
||||
|
||||
When starting with --clean packages under "start" are not loaded. Make this
|
||||
work: :packadd START {name} similar to :runtime START name
|
||||
balloon_show() does not work properly in the terminal. (Ben Jackson, 2017 Dec
|
||||
20, #2481)
|
||||
Also see #2352, want better control over balloon, perhaps set the position.
|
||||
|
||||
When using :packadd files under "later" are not used, which is inconsistent
|
||||
with packages under "start". (xtal8, #1994)
|
||||
|
||||
Patch to add changedtick var to quickfix list. (Yegappan Lakshmanan, 2017 Nov
|
||||
18, #2391)
|
||||
|
||||
7 Add a watchpoint in the debug mode: An expression that breaks execution
|
||||
when evaluating to non-zero. Add the "watchadd expr" command, stop when
|
||||
the value of the expression changes. ":watchdel" deletes an item,
|
||||
@@ -212,6 +213,9 @@ Error in emsg with buggy script. (Dominique, 2017 Apr 30)
|
||||
Patch to avoid clearing the intro message on Win32 console.
|
||||
(Ken Takata, 2017 Nov 14)
|
||||
|
||||
Patch to fix encoding in print document name (Yasuhiro Matsumoto, 2017 Dec 20,
|
||||
#2478)
|
||||
|
||||
Patch to copy buffer-local options before buffer leaves the window. (Bjorn
|
||||
Linse, 2017 Nov 14, #2336)
|
||||
|
||||
@@ -233,6 +237,9 @@ Ask whether to use Windows or Vim key behavior?
|
||||
Patch for improving detecting Ruby on Mac in configure. (Ilya Mikhaltsou, 2017
|
||||
Nov 21)
|
||||
|
||||
Add a ModeChanged autocommand that has an argument indicating the old and new
|
||||
mode. Also used for switching Terminal mode.
|
||||
|
||||
When using command line window, CmdlineLeave is triggered without
|
||||
CmdlineEnter. (xtal8, 2017 Oct 30, #2263)
|
||||
Add some way to get the nested state. Although CmdwinEnter is obviously
|
||||
@@ -271,6 +278,7 @@ The ":move" command does not honor closed folds. (Ryan Lue, #2351)
|
||||
Memory leaks in test_channel? (or is it because of fork())
|
||||
Memory leak in test_arabic.
|
||||
Using uninitialized value in test_crypt.
|
||||
Memory leaks in test_escaped_glob
|
||||
|
||||
Patch to clear background when "guibg=NONE" is used and 'termguicolors' is
|
||||
set.
|
||||
@@ -1052,8 +1060,6 @@ Patch to open folds for 'incsearch'. (Christian Brabandt, 2015 Jan 6)
|
||||
Patch for building a 32bit Vim with 64bit MingW compiler.
|
||||
(Michael Soyka, 2014 Oct 15)
|
||||
|
||||
Delete old code in os_msdos.c, mch_FullName().
|
||||
|
||||
Patch: On MS-Windows shellescape() may have to triple double quotes.
|
||||
(Ingo Karkat, 2015 Jan 16)
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
" Vim filetype plugin
|
||||
" Language: CMake
|
||||
" Maintainer: Keith Smiley <keithbsmiley@gmail.com>
|
||||
" Last Change: 2017 Dec 24
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl commentstring<"
|
||||
|
||||
setlocal commentstring=#\ %s
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: MIX (Donald Knuth's assembly language used in TAOCP)
|
||||
" Maintainer: Wu Yongwei <wuyongwei@gmail.com>
|
||||
" Filenames: *.mixal *.mix
|
||||
" Last Change: 2013 Nov 13
|
||||
" Last Change: 2017-11-26 15:21:36 +0800
|
||||
|
||||
" Quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -16,7 +16,7 @@ syn case ignore
|
||||
|
||||
" Special processing of ALF directive: implementations vary whether quotation
|
||||
" marks are needed
|
||||
syn match mixAlfParam #\s\{1,2\}"\?[^"]\{,5\}"\?# contains=mixAlfDirective,mixString nextgroup=mixEndComment contained
|
||||
syn match mixAlfParam #\s\{1,2\}"\?[^"]\{,5\}"\?# contains=mixString nextgroup=mixEndComment contained
|
||||
|
||||
" Region for parameters
|
||||
syn match mixParam #[-+*/:=0-9a-z,()"]\+# contains=mixIdentifier,mixSpecial,mixNumber,mixString,mixLabel nextgroup=mixEndComment contained
|
||||
@@ -46,6 +46,7 @@ syn keyword mixDirective ALF nextgroup=mixAlfParam contained
|
||||
" Opcodes
|
||||
syn keyword mixOpcode NOP HLT NUM CHAR FLOT FIX nextgroup=mixEndComment contained
|
||||
syn keyword mixOpcode FADD FSUB FMUL FDIV FCMP MOVE ADD SUB MUL DIV IOC IN OUT JRED JBUS JMP JSJ JOV JNOV JL JE JG JLE JNE JGE SLA SRA SLAX SRAX SLC SRC nextgroup=mixParam contained skipwhite
|
||||
syn keyword mixOpcode SLB SRB JAE JAO JXE JXO nextgroup=mixParam contained skipwhite
|
||||
|
||||
syn match mixOpcode "LD[AX1-6]N\?\>" nextgroup=mixParam contained skipwhite
|
||||
syn match mixOpcode "ST[AX1-6JZ]\>" nextgroup=mixParam contained skipwhite
|
||||
@@ -58,7 +59,7 @@ syn match mixOpcode "J[AX1-6]N\?[NZP]\>" nextgroup=mixParam contained skipwhite
|
||||
" Switch back to being case sensitive
|
||||
syn case match
|
||||
|
||||
" Registers (only to used in comments now)
|
||||
" Registers (only to be used in comments now)
|
||||
syn keyword mixRegister rA rX rI1 rI2 rI3 rI4 rI5 rI6 rJ contained
|
||||
|
||||
" The default highlighting
|
||||
|
||||
@@ -2164,6 +2164,7 @@ test_arglist \
|
||||
test_edit \
|
||||
test_erasebackword \
|
||||
test_escaped_glob \
|
||||
test_eval_stuff \
|
||||
test_ex_undo \
|
||||
test_ex_z \
|
||||
test_exec_while_if \
|
||||
|
||||
@@ -2886,6 +2886,7 @@ f_execute(typval_T *argvars, typval_T *rettv)
|
||||
int save_emsg_silent = emsg_silent;
|
||||
int save_emsg_noredir = emsg_noredir;
|
||||
int save_redir_execute = redir_execute;
|
||||
int save_redir_off = redir_off;
|
||||
garray_T save_ga;
|
||||
|
||||
rettv->vval.v_string = NULL;
|
||||
@@ -2928,6 +2929,7 @@ f_execute(typval_T *argvars, typval_T *rettv)
|
||||
save_ga = redir_execute_ga;
|
||||
ga_init2(&redir_execute_ga, (int)sizeof(char), 500);
|
||||
redir_execute = TRUE;
|
||||
redir_off = FALSE;
|
||||
|
||||
if (cmd != NULL)
|
||||
do_cmdline_cmd(cmd);
|
||||
@@ -2958,6 +2960,7 @@ f_execute(typval_T *argvars, typval_T *rettv)
|
||||
redir_execute = save_redir_execute;
|
||||
if (redir_execute)
|
||||
redir_execute_ga = save_ga;
|
||||
redir_off = save_redir_off;
|
||||
|
||||
/* "silent reg" or "silent echo x" leaves msg_col somewhere in the
|
||||
* line. Put it back in the first column. */
|
||||
|
||||
+1
-1
@@ -180,7 +180,7 @@ abandon_cmdline(void)
|
||||
static int
|
||||
empty_pattern(char_u *p)
|
||||
{
|
||||
int n = STRLEN(p);
|
||||
size_t n = STRLEN(p);
|
||||
|
||||
/* remove trailing \v and the like */
|
||||
while (n >= 2 && p[n - 2] == '\\'
|
||||
|
||||
+14
-2
@@ -1622,11 +1622,17 @@ strup_save(char_u *orig)
|
||||
char_u *s;
|
||||
|
||||
c = utf_ptr2char(p);
|
||||
l = utf_ptr2len(p);
|
||||
if (c == 0)
|
||||
{
|
||||
/* overlong sequence, use only the first byte */
|
||||
c = *p;
|
||||
l = 1;
|
||||
}
|
||||
uc = utf_toupper(c);
|
||||
|
||||
/* Reallocate string when byte count changes. This is rare,
|
||||
* thus it's OK to do another malloc()/free(). */
|
||||
l = utf_ptr2len(p);
|
||||
newl = utf_char2len(uc);
|
||||
if (newl != l)
|
||||
{
|
||||
@@ -1685,11 +1691,17 @@ strlow_save(char_u *orig)
|
||||
char_u *s;
|
||||
|
||||
c = utf_ptr2char(p);
|
||||
l = utf_ptr2len(p);
|
||||
if (c == 0)
|
||||
{
|
||||
/* overlong sequence, use only the first byte */
|
||||
c = *p;
|
||||
l = 1;
|
||||
}
|
||||
lc = utf_tolower(c);
|
||||
|
||||
/* Reallocate string when byte count changes. This is rare,
|
||||
* thus it's OK to do another malloc()/free(). */
|
||||
l = utf_ptr2len(p);
|
||||
newl = utf_char2len(lc);
|
||||
if (newl != l)
|
||||
{
|
||||
|
||||
+8
-2
@@ -3222,6 +3222,8 @@ ex_copen(exarg_T *eap)
|
||||
}
|
||||
else
|
||||
{
|
||||
int flags = 0;
|
||||
|
||||
qf_buf = qf_find_buf(qi);
|
||||
|
||||
/* The current window becomes the previous window afterwards. */
|
||||
@@ -3229,10 +3231,14 @@ ex_copen(exarg_T *eap)
|
||||
|
||||
if ((eap->cmdidx == CMD_copen || eap->cmdidx == CMD_cwindow)
|
||||
&& cmdmod.split == 0)
|
||||
/* Create the new window at the very bottom, except when
|
||||
/* Create the new quickfix window at the very bottom, except when
|
||||
* :belowright or :aboveleft is used. */
|
||||
win_goto(lastwin);
|
||||
if (win_split(height, WSP_BELOW | WSP_NEWLOC) == FAIL)
|
||||
/* Default is to open the window below the current window */
|
||||
if (cmdmod.split == 0)
|
||||
flags = WSP_BELOW;
|
||||
flags |= WSP_NEWLOC;
|
||||
if (win_split(height, flags) == FAIL)
|
||||
return; /* not enough room for window */
|
||||
RESET_BINDING(curwin);
|
||||
|
||||
|
||||
+10
-10
@@ -8053,7 +8053,7 @@ screen_start_highlight(int attr)
|
||||
else
|
||||
attr = aep->ae_attr;
|
||||
}
|
||||
if ((attr & HL_BOLD) && T_MD != NULL) /* bold */
|
||||
if ((attr & HL_BOLD) && *T_MD != NUL) /* bold */
|
||||
out_str(T_MD);
|
||||
else if (aep != NULL && cterm_normal_fg_bold &&
|
||||
#ifdef FEAT_TERMGUICOLORS
|
||||
@@ -8068,19 +8068,19 @@ screen_start_highlight(int attr)
|
||||
/* If the Normal FG color has BOLD attribute and the new HL
|
||||
* has a FG color defined, clear BOLD. */
|
||||
out_str(T_ME);
|
||||
if ((attr & HL_STANDOUT) && T_SO != NULL) /* standout */
|
||||
if ((attr & HL_STANDOUT) && *T_SO != NUL) /* standout */
|
||||
out_str(T_SO);
|
||||
if ((attr & HL_UNDERCURL) && T_UCS != NULL) /* undercurl */
|
||||
if ((attr & HL_UNDERCURL) && *T_UCS != NUL) /* undercurl */
|
||||
out_str(T_UCS);
|
||||
if (((attr & HL_UNDERLINE) /* underline or undercurl */
|
||||
|| ((attr & HL_UNDERCURL) && T_UCS == NULL))
|
||||
&& T_US != NULL)
|
||||
|| ((attr & HL_UNDERCURL) && *T_UCS == NUL))
|
||||
&& *T_US != NUL)
|
||||
out_str(T_US);
|
||||
if ((attr & HL_ITALIC) && T_CZH != NULL) /* italic */
|
||||
if ((attr & HL_ITALIC) && *T_CZH != NUL) /* italic */
|
||||
out_str(T_CZH);
|
||||
if ((attr & HL_INVERSE) && T_MR != NULL) /* inverse (reverse) */
|
||||
if ((attr & HL_INVERSE) && *T_MR != NUL) /* inverse (reverse) */
|
||||
out_str(T_MR);
|
||||
if ((attr & HL_STRIKETHROUGH) && T_STS != NULL) /* strike */
|
||||
if ((attr & HL_STRIKETHROUGH) && *T_STS != NUL) /* strike */
|
||||
out_str(T_STS);
|
||||
|
||||
/*
|
||||
@@ -8192,7 +8192,7 @@ screen_stop_highlight(void)
|
||||
else
|
||||
out_str(T_SE);
|
||||
}
|
||||
if ((screen_attr & HL_UNDERCURL) && T_UCE != NULL)
|
||||
if ((screen_attr & HL_UNDERCURL) && *T_UCE != NUL)
|
||||
{
|
||||
if (STRCMP(T_UCE, T_ME) == 0)
|
||||
do_ME = TRUE;
|
||||
@@ -8200,7 +8200,7 @@ screen_stop_highlight(void)
|
||||
out_str(T_UCE);
|
||||
}
|
||||
if ((screen_attr & HL_UNDERLINE)
|
||||
|| ((screen_attr & HL_UNDERCURL) && T_UCE == NULL))
|
||||
|| ((screen_attr & HL_UNDERCURL) && *T_UCE == NUL))
|
||||
{
|
||||
if (STRCMP(T_UE, T_ME) == 0)
|
||||
do_ME = TRUE;
|
||||
|
||||
@@ -94,6 +94,7 @@ NEW_TESTS = test_arabic.res \
|
||||
test_edit.res \
|
||||
test_erasebackword.res \
|
||||
test_escaped_glob.res \
|
||||
test_eval_stuff.res \
|
||||
test_exec_while_if.res \
|
||||
test_exists.res \
|
||||
test_exists_autocmd.res \
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
Test for various eval features. vim: set ft=vim :
|
||||
|
||||
NOTE: Do not add more here, use new style test test_eval_stuff.vim
|
||||
|
||||
Note: system clipboard is saved, changed and restored.
|
||||
|
||||
clipboard contents
|
||||
@@ -134,10 +136,10 @@ if has('clipboard')
|
||||
let _clipreg = ['*', getreg('*'), getregtype('*')]
|
||||
let _clipopt = &cb
|
||||
let &cb='unnamed'
|
||||
5y
|
||||
7y
|
||||
AR *
|
||||
tabdo :windo :echo "hi"
|
||||
6y
|
||||
8y
|
||||
AR *
|
||||
let &cb=_clipopt
|
||||
call call('setreg', _clipreg)
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
" Tests for various eval things.
|
||||
|
||||
function s:foo() abort
|
||||
try
|
||||
return [] == 0
|
||||
catch
|
||||
return 1
|
||||
endtry
|
||||
endfunction
|
||||
|
||||
func Test_catch_return_with_error()
|
||||
call assert_equal(1, s:foo())
|
||||
endfunc
|
||||
@@ -268,6 +268,11 @@ func Test_tolower()
|
||||
" Ⱥ (U+023A) and Ⱦ (U+023E) are the *only* code points to increase
|
||||
" in length (2 to 3 bytes) when lowercased. So let's test them.
|
||||
call assert_equal("ⱥ ⱦ", tolower("Ⱥ Ⱦ"))
|
||||
|
||||
" This call to tolower with invalid utf8 sequence used to cause access to
|
||||
" invalid memory.
|
||||
call tolower("\xC0\x80\xC0")
|
||||
call tolower("123\xC0\x80\xC0")
|
||||
endfunc
|
||||
|
||||
func Test_toupper()
|
||||
@@ -338,6 +343,11 @@ func Test_toupper()
|
||||
call assert_equal("ZŹŻŽƵẐẔ", toupper("ZŹŻŽƵẐẔ"))
|
||||
|
||||
call assert_equal("Ⱥ Ⱦ", toupper("ⱥ ⱦ"))
|
||||
|
||||
" This call to toupper with invalid utf8 sequence used to cause access to
|
||||
" invalid memory.
|
||||
call toupper("\xC0\x80\xC0")
|
||||
call toupper("123\xC0\x80\xC0")
|
||||
endfunc
|
||||
|
||||
" Tests for the mode() function
|
||||
|
||||
@@ -7,7 +7,8 @@ func Test_gf_url()
|
||||
\ "first test for URL://machine.name/tmp/vimtest2a and other text",
|
||||
\ "second test for URL://machine.name/tmp/vimtest2b. And other text",
|
||||
\ "third test for URL:\\\\machine.name\\vimtest2c and other text",
|
||||
\ "fourth test for URL:\\\\machine.name\\tmp\\vimtest2d, and other text"
|
||||
\ "fourth test for URL:\\\\machine.name\\tmp\\vimtest2d, and other text",
|
||||
\ "fifth test for URL://machine.name/tmp?q=vim&opt=yes and other text",
|
||||
\ ])
|
||||
call cursor(1,1)
|
||||
call search("^first")
|
||||
@@ -28,6 +29,10 @@ func Test_gf_url()
|
||||
call search("URL")
|
||||
call assert_equal("URL:\\\\machine.name\\tmp\\vimtest2d", expand("<cfile>"))
|
||||
|
||||
call search("^fifth")
|
||||
call search("URL")
|
||||
call assert_equal("URL://machine.name/tmp?q=vim&opt=yes", expand("<cfile>"))
|
||||
|
||||
set isf&vim
|
||||
enew!
|
||||
endfunc
|
||||
|
||||
@@ -3078,3 +3078,30 @@ func Test_lvimgrep_crash()
|
||||
augroup END
|
||||
enew | only
|
||||
endfunc
|
||||
|
||||
" Test for the position of the quickfix and location list window
|
||||
func Test_qfwin_pos()
|
||||
" Open two windows
|
||||
new | only
|
||||
new
|
||||
cexpr ['F1:10:L10']
|
||||
copen
|
||||
" Quickfix window should be the bottom most window
|
||||
call assert_equal(3, winnr())
|
||||
close
|
||||
" Open at the very top
|
||||
wincmd t
|
||||
topleft copen
|
||||
call assert_equal(1, winnr())
|
||||
close
|
||||
" open left of the current window
|
||||
wincmd t
|
||||
below new
|
||||
leftabove copen
|
||||
call assert_equal(2, winnr())
|
||||
close
|
||||
" open right of the current window
|
||||
rightbelow copen
|
||||
call assert_equal(3, winnr())
|
||||
close
|
||||
endfunc
|
||||
|
||||
@@ -206,3 +206,15 @@ func Test_CmdCompletion()
|
||||
com! -complete=customlist,CustomComp DoCmd :
|
||||
call assert_fails("call feedkeys(':DoCmd \<C-D>', 'tx')", 'E117:')
|
||||
endfunc
|
||||
|
||||
func CallExecute(A, L, P)
|
||||
" Drop first '\n'
|
||||
return execute('echo "hi"')[1:]
|
||||
endfunc
|
||||
|
||||
func Test_use_execute_in_completion()
|
||||
command! -nargs=* -complete=custom,CallExecute DoExec :
|
||||
call feedkeys(":DoExec \<C-A>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"DoExec hi', @:)
|
||||
delcommand DoExec
|
||||
endfunc
|
||||
|
||||
@@ -2972,6 +2972,9 @@ ex_return(exarg_T *eap)
|
||||
/* It's safer to return also on error. */
|
||||
else if (!eap->skip)
|
||||
{
|
||||
/* In return statement, cause_abort should be force_abort. */
|
||||
update_force_abort();
|
||||
|
||||
/*
|
||||
* Return unless the expression evaluation has been cancelled due to an
|
||||
* aborting error, an interrupt, or an exception.
|
||||
|
||||
@@ -786,6 +786,22 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1428,
|
||||
/**/
|
||||
1427,
|
||||
/**/
|
||||
1426,
|
||||
/**/
|
||||
1425,
|
||||
/**/
|
||||
1424,
|
||||
/**/
|
||||
1423,
|
||||
/**/
|
||||
1422,
|
||||
/**/
|
||||
1421,
|
||||
/**/
|
||||
1420,
|
||||
/**/
|
||||
|
||||
+14
-2
@@ -6094,7 +6094,6 @@ grab_file_name(long count, linenr_T *file_lnum)
|
||||
count, curbuf->b_ffname);
|
||||
}
|
||||
return file_name_at_cursor(options | FNAME_HYP, count, file_lnum);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -6133,6 +6132,8 @@ file_name_in_line(
|
||||
{
|
||||
char_u *ptr;
|
||||
int len;
|
||||
int in_type = TRUE;
|
||||
int is_url = FALSE;
|
||||
|
||||
/*
|
||||
* search forward for what could be the start of a file name
|
||||
@@ -6171,8 +6172,19 @@ file_name_in_line(
|
||||
*/
|
||||
len = 0;
|
||||
while (vim_isfilec(ptr[len]) || (ptr[len] == '\\' && ptr[len + 1] == ' ')
|
||||
|| ((options & FNAME_HYP) && path_is_url(ptr + len)))
|
||||
|| ((options & FNAME_HYP) && path_is_url(ptr + len))
|
||||
|| (is_url && vim_strchr((char_u *)"?&=", ptr[len]) != NULL))
|
||||
{
|
||||
/* After type:// we also include ?, & and = as valid characters, so that
|
||||
* http://google.com?q=this&that=ok works. */
|
||||
if ((ptr[len] >= 'A' && ptr[len] <= 'Z') || (ptr[len] >= 'a' && ptr[len] <= 'z'))
|
||||
{
|
||||
if (in_type && path_is_url(ptr + len + 1))
|
||||
is_url = TRUE;
|
||||
}
|
||||
else
|
||||
in_type = FALSE;
|
||||
|
||||
if (ptr[len] == '\\')
|
||||
/* Skip over the "\" in "\ ". */
|
||||
++len;
|
||||
|
||||
Reference in New Issue
Block a user