mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-07 15:37:14 +02:00
Merge upstream
Conflicts: src/vim.h
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.1. Last change: 2007 Aug 10
|
||||
*options.txt* For Vim version 7.1. Last change: 2008 Feb 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -4951,7 +4951,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|autocmd-osfiletypes|
|
||||
|
||||
*'paragraphs'* *'para'*
|
||||
'paragraphs' 'para' string (default "IPLPPPQPP LIpplpipbp")
|
||||
'paragraphs' 'para' string (default "IPLPPPQPP TPHPLIPpLpItpplpipbp")
|
||||
global
|
||||
Specifies the nroff macros that separate paragraphs. These are pairs
|
||||
of two letters (see |object-motions|).
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim plugin for showing matching parens
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2008 Jan 06
|
||||
" Last Change: 2008 Feb 27
|
||||
|
||||
" Exit quickly when:
|
||||
" - this plugin was already loaded (or disabled)
|
||||
@@ -34,7 +34,8 @@ function! s:Highlight_Matching_Pair()
|
||||
endif
|
||||
|
||||
" Avoid that we remove the popup menu.
|
||||
if pumvisible()
|
||||
" Return when there are no colors (looks like the cursor jumps).
|
||||
if pumvisible() || (&t_Co < 8 && !has("gui_running"))
|
||||
return
|
||||
endif
|
||||
|
||||
@@ -60,39 +61,13 @@ function! s:Highlight_Matching_Pair()
|
||||
endif
|
||||
|
||||
" Figure out the arguments for searchpairpos().
|
||||
" Restrict the search to visible lines with "stopline".
|
||||
" And avoid searching very far (e.g., for closed folds and long lines)
|
||||
" The "viewable" variables give a range in which we can scroll while keeping
|
||||
" the cursor at the same position
|
||||
" adjustedScrolloff accounts for very large numbers of scrolloff
|
||||
let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2])
|
||||
let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2])
|
||||
let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2])
|
||||
" one of these stoplines will be adjusted below, but the current values are
|
||||
" minimal boundaries within the current window
|
||||
let stoplinebottom = line('w$')
|
||||
let stoplinetop = line('w0')
|
||||
if i % 2 == 0
|
||||
let s_flags = 'nW'
|
||||
let c2 = plist[i + 1]
|
||||
if has("byte_offset") && has("syntax_items") && &smc > 0
|
||||
let stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2])
|
||||
let stopline = min([bottom_viewable, byte2line(stopbyte)])
|
||||
else
|
||||
let stopline = min([bottom_viewable, c_lnum + 100])
|
||||
endif
|
||||
let stoplinebottom = stopline
|
||||
else
|
||||
let s_flags = 'nbW'
|
||||
let c2 = c
|
||||
let c = plist[i - 1]
|
||||
if has("byte_offset") && has("syntax_items") && &smc > 0
|
||||
let stopbyte = max([1, line2byte(".") + col(".") - &smc * 2])
|
||||
let stopline = max([top_viewable, byte2line(stopbyte)])
|
||||
else
|
||||
let stopline = max([top_viewable, c_lnum - 100])
|
||||
endif
|
||||
let stoplinetop = stopline
|
||||
endif
|
||||
if c == '['
|
||||
let c = '\['
|
||||
@@ -111,10 +86,47 @@ function! s:Highlight_Matching_Pair()
|
||||
\ '=~? "string\\|character\\|singlequote\\|comment"'
|
||||
execute 'if' s_skip '| let s_skip = 0 | endif'
|
||||
|
||||
" Limit the search to lines visible in the window.
|
||||
let stoplinebottom = line('w$')
|
||||
let stoplinetop = line('w0')
|
||||
if i % 2 == 0
|
||||
let stopline = stoplinebottom
|
||||
else
|
||||
let stopline = stoplinetop
|
||||
endif
|
||||
|
||||
try
|
||||
" Limit the search time to 500 msec to avoid a hang on very long lines.
|
||||
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, 500)
|
||||
" Limit the search time to 300 msec to avoid a hang on very long lines.
|
||||
" This fails when a timeout is not supported.
|
||||
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, 300)
|
||||
catch /E118/
|
||||
" Can't use the timeout, restrict the stopline a bit more to avoid taking
|
||||
" a long time on closed folds and long lines.
|
||||
" The "viewable" variables give a range in which we can scroll while
|
||||
" keeping the cursor at the same position.
|
||||
" adjustedScrolloff accounts for very large numbers of scrolloff.
|
||||
let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2])
|
||||
let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2])
|
||||
let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2])
|
||||
" one of these stoplines will be adjusted below, but the current values are
|
||||
" minimal boundaries within the current window
|
||||
if i % 2 == 0
|
||||
if has("byte_offset") && has("syntax_items") && &smc > 0
|
||||
let stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2])
|
||||
let stopline = min([bottom_viewable, byte2line(stopbyte)])
|
||||
else
|
||||
let stopline = min([bottom_viewable, c_lnum + 100])
|
||||
endif
|
||||
let stoplinebottom = stopline
|
||||
else
|
||||
if has("byte_offset") && has("syntax_items") && &smc > 0
|
||||
let stopbyte = max([1, line2byte(".") + col(".") - &smc * 2])
|
||||
let stopline = max([top_viewable, byte2line(stopbyte)])
|
||||
else
|
||||
let stopline = max([top_viewable, c_lnum - 100])
|
||||
endif
|
||||
let stoplinetop = stopline
|
||||
endif
|
||||
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline)
|
||||
endtry
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ gvimext.dll: gvimext.obj \
|
||||
gvimext.obj: gvimext.h
|
||||
|
||||
.cpp.obj:
|
||||
$(cc) $(cflags) -DFEAT_GETTEXT $(cvarsdll) $*.cpp
|
||||
$(cc) $(cflags) -DFEAT_GETTEXT $(cvarsmt) $*.cpp
|
||||
|
||||
gvimext.res: gvimext.rc
|
||||
$(rc) $(rcflags) $(rcvars) gvimext.rc
|
||||
|
||||
+10
-3
@@ -82,9 +82,8 @@ To compile and debug Vim with the VC2003 Toolkit, you will also need
|
||||
|ms-platform-sdk|, |dotnet-1.1-redist|, |dotnet-1.1-sdk|,
|
||||
and |windbg-download|.
|
||||
|
||||
It's easier to download Visual C++ 2005 Express Edition, |msvc-2005-express|.
|
||||
The advantage of the VC 2003 Toolkit is that it will be freely available
|
||||
long after VC 2005 Express Edition stops being free in November 2006.
|
||||
It's easier to download Visual C++ 2008 Express Edition, |msvc-2008-express|,
|
||||
which is freely available in perpetuity.
|
||||
|
||||
The free Code::Blocks IDE works with the VC2003 Toolkit, as described at
|
||||
http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_Toolkit_2003_with_Code::Blocks_IDE
|
||||
@@ -152,6 +151,14 @@ Instructions for integrating the Platform SDK into VC Express:
|
||||
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx
|
||||
|
||||
|
||||
Visual C++ 2008 Express Edition *msvc-2008-express*
|
||||
-------------------------------
|
||||
|
||||
Visual C++ 2008 Express Edition can be downloaded for free from:
|
||||
http://msdn2.microsoft.com/en-us/express/default.aspx
|
||||
This includes the IDE and the debugger. You can build Vim with Make_mvc.mak.
|
||||
|
||||
|
||||
2. MinGW
|
||||
========
|
||||
|
||||
|
||||
+18
-12
@@ -1,6 +1,7 @@
|
||||
# Makefile for Vim on Win32 (Windows NT/2000/XP/2003 and Windows 95/98/Me)
|
||||
# and Win64, using the Microsoft Visual C++ compilers. Known to work with
|
||||
# VC5, VC6 (VS98), VC7.0 (VS2002), VC7.1 (VS2003), and VC8 (VS2005).
|
||||
# VC5, VC6 (VS98), VC7.0 (VS2002), VC7.1 (VS2003), VC8 (VS2005),
|
||||
# and VC9 (VS2008).
|
||||
#
|
||||
# To build using other Windows compilers, see INSTALLpc.txt
|
||||
#
|
||||
@@ -285,7 +286,8 @@ XPM_INC = -I $(XPM)\include
|
||||
# need shell32.lib for ExtractIcon()
|
||||
# gdi32.lib and comdlg32.lib for printing support
|
||||
# ole32.lib and uuid.lib are needed for FEAT_SHORTCUT
|
||||
CON_LIB = advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib
|
||||
CON_LIB = oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib \
|
||||
comdlg32.lib ole32.lib uuid.lib /machine:$(CPU) /nodefaultlib
|
||||
!if "$(DELAYLOAD)" == "yes"
|
||||
CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib
|
||||
!endif
|
||||
@@ -331,6 +333,7 @@ MSVCVER = 5.0
|
||||
!endif
|
||||
!if "$(_NMAKE_VER)" == "6.00.8168.0"
|
||||
MSVCVER = 6.0
|
||||
CPU = ix86
|
||||
!endif
|
||||
!if "$(_NMAKE_VER)" == "7.00.9466"
|
||||
MSVCVER = 7.0
|
||||
@@ -344,6 +347,9 @@ MSVCVER = 8.0
|
||||
!if "$(_NMAKE_VER)" == "8.00.50727.762"
|
||||
MSVCVER = 8.0
|
||||
!endif
|
||||
!if "$(_NMAKE_VER)" == "9.00.20706.01"
|
||||
MSVCVER = 9.0
|
||||
!endif
|
||||
!endif
|
||||
|
||||
# Abort bulding VIM if version of VC is unrecognised.
|
||||
@@ -352,13 +358,13 @@ MSVCVER = 8.0
|
||||
!message Cannot determine Visual C version being used. If you are using the
|
||||
!message Windows SDK then you must have the environment variable MSVCVER set to
|
||||
!message your version of the VC compiler. If you are not using the Express
|
||||
!message version of Visual C you van either set MSVCVER or update this makefile
|
||||
!message to handle the new value for _NMAKE_VER.
|
||||
!message version of Visual C, you can either set MSVCVER or update this makefile
|
||||
!message to handle the new value for _NMAKE_VER, "$(_NMAKE_VER)".
|
||||
!error Make aborted.
|
||||
!endif
|
||||
|
||||
# Convert processor ID to MVC-compatible number
|
||||
!if "$(MSVCVER)" != "8.0"
|
||||
!if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0")
|
||||
!if "$(CPUNR)" == "i386"
|
||||
CPUARG = /G3
|
||||
!elseif "$(CPUNR)" == "i486"
|
||||
@@ -373,7 +379,7 @@ CPUARG = /G7 /arch:SSE2
|
||||
CPUARG =
|
||||
!endif
|
||||
!else
|
||||
# VC8 only allows specifying SSE architecture
|
||||
# VC8/9 only allows specifying SSE architecture
|
||||
!if "$(CPUNR)" == "pentium4"
|
||||
CPUARG = /arch:SSE2
|
||||
!endif
|
||||
@@ -391,7 +397,7 @@ OPTFLAG = /O2
|
||||
!else # MAXSPEED
|
||||
OPTFLAG = /Ox
|
||||
!endif
|
||||
!if "$(MSVCVER)" == "8.0"
|
||||
!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0")
|
||||
# Use link time code generation if not worried about size
|
||||
!if "$(OPTIMIZE)" != "SPACE"
|
||||
OPTFLAG = $(OPTFLAG) /GL
|
||||
@@ -404,11 +410,11 @@ CFLAGS = $(CFLAGS) /MD
|
||||
LIBC = msvcrt.lib
|
||||
! else
|
||||
LIBC = libcmt.lib
|
||||
CFLAGS = $(CFLAGS) /MT
|
||||
CFLAGS = $(CFLAGS) /Zl /MT
|
||||
! endif
|
||||
!else # DEBUG
|
||||
VIM = vimd
|
||||
! if "$(CPU)" == "i386"
|
||||
! if ("$(CPU)" == "i386") || ("$(CPU)" == "ix86")
|
||||
DEBUGINFO = /ZI
|
||||
! endif
|
||||
CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od
|
||||
@@ -424,7 +430,7 @@ CFLAGS = $(CFLAGS) /MDd
|
||||
LIBC = $(LIBC) msvcrtd.lib
|
||||
! else
|
||||
LIBC = $(LIBC) libcmtd.lib
|
||||
CFLAGS = $(CFLAGS) /MTd
|
||||
CFLAGS = $(CFLAGS) /Zl /MTd
|
||||
! endif
|
||||
!endif # DEBUG
|
||||
|
||||
@@ -534,7 +540,7 @@ GUI_OBJ = \
|
||||
$(OUTDIR)\gui_w32.obj \
|
||||
$(OUTDIR)\os_w32exe.obj
|
||||
GUI_LIB = \
|
||||
oldnames.lib kernel32.lib gdi32.lib version.lib $(IME_LIB) \
|
||||
gdi32.lib version.lib $(IME_LIB) \
|
||||
winspool.lib comctl32.lib advapi32.lib shell32.lib \
|
||||
/machine:$(CPU) /nodefaultlib
|
||||
!else
|
||||
@@ -757,7 +763,7 @@ LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(LIBC) $(OLE_LIB) user32.lib $(SNIFF_LIB) \
|
||||
|
||||
# Report link time code generation progress if used.
|
||||
!ifdef NODEBUG
|
||||
!if "$(MSVCVER)" == "8.0"
|
||||
!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0")
|
||||
!if "$(OPTIMIZE)" != "SPACE"
|
||||
LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
|
||||
!endif
|
||||
|
||||
+1
-1
@@ -545,7 +545,7 @@ LINT_OPTIONS = -beprxzF
|
||||
# For unknown reasons adding "-lc" fixes a linking problem with GCC. That's
|
||||
# probably a bug in the "-pg" implementation.
|
||||
# Need to recompile everything after changing this: "make clean" "make".
|
||||
#PROFILE_CFLAGS = -pg -g
|
||||
#PROFILE_CFLAGS = -pg -g -DWE_ARE_PROFILING
|
||||
#PROFILE_LIBS = -pg
|
||||
#PROFILE_LIBS = -pg -lc
|
||||
|
||||
|
||||
+4
-3
@@ -4922,7 +4922,7 @@ chk_modeline(lnum, flags)
|
||||
return retval;
|
||||
}
|
||||
|
||||
#ifdef FEAT_VIMINFO
|
||||
#if defined(FEAT_VIMINFO) || defined(PROTO)
|
||||
int
|
||||
read_viminfo_bufferlist(virp, writing)
|
||||
vir_T *virp;
|
||||
@@ -5043,13 +5043,14 @@ buf_spname(buf)
|
||||
#if defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS)
|
||||
if (bt_quickfix(buf))
|
||||
{
|
||||
win_T *win;
|
||||
win_T *win = NULL;
|
||||
tabpage_T *tp;
|
||||
|
||||
/*
|
||||
* For location list window, w_llist_ref points to the location list.
|
||||
* For quickfix window, w_llist_ref is NULL.
|
||||
*/
|
||||
FOR_ALL_WINDOWS(win)
|
||||
FOR_ALL_TAB_WINDOWS(tp, win)
|
||||
if (win->w_buffer == buf)
|
||||
break;
|
||||
if (win != NULL && win->w_llist_ref != NULL)
|
||||
|
||||
+1
-1
@@ -1365,7 +1365,7 @@ install_registry(void)
|
||||
|
||||
printf("Creating \"Edit with Vim\" popup menu entry\n");
|
||||
|
||||
fprintf(fd, "HKEY_CLASSES_ROOT\\CLSID\\%s\n", vim_ext_clsid);
|
||||
fprintf(fd, "[HKEY_CLASSES_ROOT\\CLSID\\%s]\n", vim_ext_clsid);
|
||||
fprintf(fd, "@=\"%s\"\n", vim_ext_name);
|
||||
fprintf(fd, "[HKEY_CLASSES_ROOT\\CLSID\\%s\\InProcServer32]\n",
|
||||
vim_ext_clsid);
|
||||
|
||||
+2
-2
@@ -5491,7 +5491,7 @@ insertchar(c, flags, second_indent)
|
||||
#if defined(FEAT_EVAL)
|
||||
int do_internal = TRUE;
|
||||
|
||||
if (*curbuf->b_p_fex != NUL)
|
||||
if (*curbuf->b_p_fex != NUL && (flags & INSCHAR_NO_FEX) == 0)
|
||||
{
|
||||
do_internal = (fex_format(curwin->w_cursor.lnum, 1L, c) != 0);
|
||||
/* It may be required to save for undo again, e.g. when setline()
|
||||
@@ -6057,7 +6057,7 @@ auto_format(trailblank, prev_line)
|
||||
* be adjusted for the text formatting.
|
||||
*/
|
||||
saved_cursor = pos;
|
||||
format_lines((linenr_T)-1);
|
||||
format_lines((linenr_T)-1, FALSE);
|
||||
curwin->w_cursor = saved_cursor;
|
||||
saved_cursor.lnum = 0;
|
||||
|
||||
|
||||
+4
-1
@@ -13974,6 +13974,7 @@ f_reverse(argvars, rettv)
|
||||
rettv->vval.v_list = l;
|
||||
rettv->v_type = VAR_LIST;
|
||||
++l->lv_refcount;
|
||||
l->lv_idx = l->lv_len - l->lv_idx - 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14682,6 +14683,8 @@ f_setline(argvars, rettv)
|
||||
appended_lines_mark(lcount, added);
|
||||
}
|
||||
|
||||
static void set_qf_ll_list __ARGS((win_T *wp, typval_T *list_arg, typval_T *action_arg, typval_T *rettv));
|
||||
|
||||
/*
|
||||
* Used by "setqflist()" and "setloclist()" functions
|
||||
*/
|
||||
@@ -15220,7 +15223,7 @@ f_sort(argvars, rettv)
|
||||
if (!item_compare_func_err)
|
||||
{
|
||||
/* Clear the List and append the items in the sorted order. */
|
||||
l->lv_first = l->lv_last = NULL;
|
||||
l->lv_first = l->lv_last = l->lv_idx_item = NULL;
|
||||
l->lv_len = 0;
|
||||
for (i = 0; i < len; ++i)
|
||||
list_append(l, ptrs[i]);
|
||||
|
||||
+3
-5
@@ -3015,7 +3015,7 @@ modifier_len(cmd)
|
||||
break;
|
||||
if (!isalpha(p[j]) && j >= cmdmods[i].minlen
|
||||
&& (p == cmd || cmdmods[i].has_count))
|
||||
return j + (p - cmd);
|
||||
return j + (int)(p - cmd);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -3949,8 +3949,7 @@ get_address(ptr, skip, to_other_file)
|
||||
curwin->w_cursor.col = 0;
|
||||
searchcmdlen = 0;
|
||||
if (!do_search(NULL, c, cmd, 1L,
|
||||
SEARCH_HIS + SEARCH_MSG + SEARCH_START,
|
||||
NULL))
|
||||
SEARCH_HIS | SEARCH_MSG, NULL))
|
||||
{
|
||||
curwin->w_cursor = pos;
|
||||
cmd = NULL;
|
||||
@@ -3997,8 +3996,7 @@ get_address(ptr, skip, to_other_file)
|
||||
pos.col = 0;
|
||||
if (searchit(curwin, curbuf, &pos,
|
||||
*cmd == '?' ? BACKWARD : FORWARD,
|
||||
(char_u *)"", 1L,
|
||||
SEARCH_MSG + SEARCH_START,
|
||||
(char_u *)"", 1L, SEARCH_MSG,
|
||||
i, (linenr_T)0, NULL) != FAIL)
|
||||
lnum = pos.lnum;
|
||||
else
|
||||
|
||||
+1
-1
@@ -9244,7 +9244,7 @@ aucmd_prepbuf(aco, buf)
|
||||
aco_save_T *aco; /* structure to save values in */
|
||||
buf_T *buf; /* new curbuf */
|
||||
{
|
||||
aco->save_buf = buf;
|
||||
aco->save_buf = curbuf;
|
||||
curbuf = buf;
|
||||
curwin->w_buffer = buf;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1263,7 +1263,7 @@ EXTERN int echo_wid_arg INIT(= FALSE); /* --echo-wid argument */
|
||||
* The value of the --windowid argument.
|
||||
* For embedding gvim inside another application.
|
||||
*/
|
||||
EXTERN int win_socket_id INIT(= 0);
|
||||
EXTERN long_u win_socket_id INIT(= 0);
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_CLIENTSERVER) || defined(FEAT_EVAL)
|
||||
|
||||
+667
-231
File diff suppressed because it is too large
Load Diff
+95
-16
@@ -1400,7 +1400,7 @@ cs_lookup_cmd(eap)
|
||||
return NULL;
|
||||
|
||||
/* Store length of eap->arg before it gets modified by strtok(). */
|
||||
eap_arg_len = STRLEN(eap->arg);
|
||||
eap_arg_len = (int)STRLEN(eap->arg);
|
||||
|
||||
if ((stok = strtok((char *)(eap->arg), (const char *)" ")) == NULL)
|
||||
return NULL;
|
||||
@@ -2096,6 +2096,18 @@ cs_read_prompt(i)
|
||||
return CSCOPE_SUCCESS;
|
||||
}
|
||||
|
||||
#if defined(UNIX) && defined(SIGALRM)
|
||||
/*
|
||||
* Used to catch and ignore SIGALRM below.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
static RETSIGTYPE
|
||||
sig_handler SIGDEFARG(sigarg)
|
||||
{
|
||||
/* do nothing */
|
||||
SIGRETURN;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_release_csp
|
||||
@@ -2108,9 +2120,6 @@ cs_release_csp(i, freefnpp)
|
||||
int i;
|
||||
int freefnpp;
|
||||
{
|
||||
#if defined(UNIX)
|
||||
int pstat;
|
||||
#else
|
||||
/*
|
||||
* Trying to exit normally (not sure whether it is fit to UNIX cscope
|
||||
*/
|
||||
@@ -2119,6 +2128,88 @@ cs_release_csp(i, freefnpp)
|
||||
(void)fputs("q\n", csinfo[i].to_fp);
|
||||
(void)fflush(csinfo[i].to_fp);
|
||||
}
|
||||
#if defined(UNIX)
|
||||
{
|
||||
int waitpid_errno;
|
||||
int pstat;
|
||||
pid_t pid;
|
||||
|
||||
# if defined(HAVE_SIGACTION)
|
||||
struct sigaction sa, old;
|
||||
|
||||
/* Use sigaction() to limit the waiting time to two seconds. */
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sa.sa_handler = sig_handler;
|
||||
sa.sa_flags = SA_NODEFER;
|
||||
sigaction(SIGALRM, &sa, &old);
|
||||
alarm(2); /* 2 sec timeout */
|
||||
|
||||
/* Block until cscope exits or until timer expires */
|
||||
pid = waitpid(csinfo[i].pid, &pstat, 0);
|
||||
waitpid_errno = errno;
|
||||
|
||||
/* cancel pending alarm if still there and restore signal */
|
||||
alarm(0);
|
||||
sigaction(SIGALRM, &old, NULL);
|
||||
# else
|
||||
int waited;
|
||||
|
||||
/* Can't use sigaction(), loop for two seconds. First yield the CPU
|
||||
* to give cscope a chance to exit quickly. */
|
||||
sleep(0);
|
||||
for (waited = 0; waited < 40; ++waited)
|
||||
{
|
||||
pid = waitpid(csinfo[i].pid, &pstat, WNOHANG);
|
||||
waitpid_errno = errno;
|
||||
if (pid != 0)
|
||||
break; /* break unless the process is still running */
|
||||
mch_delay(50L, FALSE); /* sleep 50 ms */
|
||||
}
|
||||
# endif
|
||||
/*
|
||||
* If the cscope process is still running: kill it.
|
||||
* Safety check: If the PID would be zero here, the entire X session
|
||||
* would be killed. -1 and 1 are dangerous as well.
|
||||
*/
|
||||
if (pid < 0 && csinfo[i].pid > 1)
|
||||
{
|
||||
# ifdef ECHILD
|
||||
int alive = TRUE;
|
||||
|
||||
if (waitpid_errno == ECHILD)
|
||||
{
|
||||
/*
|
||||
* When using 'vim -g', vim is forked and cscope process is
|
||||
* no longer a child process but a sibling. So waitpid()
|
||||
* fails with errno being ECHILD (No child processes).
|
||||
* Don't send SIGKILL to cscope immediately but wait
|
||||
* (polling) for it to exit normally as result of sending
|
||||
* the "q" command, hence giving it a chance to clean up
|
||||
* its temporary files.
|
||||
*/
|
||||
int waited;
|
||||
|
||||
sleep(0);
|
||||
for (waited = 0; waited < 40; ++waited)
|
||||
{
|
||||
/* Check whether cscope process is still alive */
|
||||
if (kill(csinfo[i].pid, 0) != 0)
|
||||
{
|
||||
alive = FALSE; /* cscope process no longer exists */
|
||||
break;
|
||||
}
|
||||
mch_delay(50L, FALSE); /* sleep 50ms */
|
||||
}
|
||||
}
|
||||
if (alive)
|
||||
# endif
|
||||
{
|
||||
kill(csinfo[i].pid, SIGKILL);
|
||||
(void)waitpid(csinfo[i].pid, &pstat, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
#else /* !UNIX */
|
||||
if (csinfo[i].hProc != NULL)
|
||||
{
|
||||
/* Give cscope a chance to exit normally */
|
||||
@@ -2133,18 +2224,6 @@ cs_release_csp(i, freefnpp)
|
||||
if (csinfo[i].to_fp != NULL)
|
||||
(void)fclose(csinfo[i].to_fp);
|
||||
|
||||
/*
|
||||
* Safety check: If the PID would be zero here, the entire X session would
|
||||
* be killed. -1 and 1 are dangerous as well.
|
||||
*/
|
||||
#if defined(UNIX)
|
||||
if (csinfo[i].pid > 1)
|
||||
{
|
||||
kill(csinfo[i].pid, SIGTERM);
|
||||
(void)waitpid(csinfo[i].pid, &pstat, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (freefnpp)
|
||||
{
|
||||
vim_free(csinfo[i].fname);
|
||||
|
||||
+9
-3
@@ -34,6 +34,12 @@ extern HWND s_hwnd;
|
||||
extern HWND vim_parent_hwnd;
|
||||
}
|
||||
|
||||
#if _MSC_VER < 1300
|
||||
/* Work around old versions of basetsd.h which wrongly declares
|
||||
* UINT_PTR as unsigned long */
|
||||
# define UINT_PTR UINT
|
||||
#endif
|
||||
|
||||
#include "if_ole.h" // Interface definitions
|
||||
#include "iid_ole.c" // UUID definitions (compile here)
|
||||
|
||||
@@ -107,7 +113,7 @@ public:
|
||||
STDMETHOD(SendKeys)(BSTR keys);
|
||||
STDMETHOD(Eval)(BSTR expr, BSTR *result);
|
||||
STDMETHOD(SetForeground)(void);
|
||||
STDMETHOD(GetHwnd)(UINT *result);
|
||||
STDMETHOD(GetHwnd)(UINT_PTR *result);
|
||||
|
||||
private:
|
||||
// Constructor is private - create using CVim::Create()
|
||||
@@ -288,9 +294,9 @@ CVim::Invoke(
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
CVim::GetHwnd(UINT *result)
|
||||
CVim::GetHwnd(UINT_PTR *result)
|
||||
{
|
||||
*result = (UINT) s_hwnd;
|
||||
*result = (UINT_PTR)s_hwnd;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -79,7 +79,7 @@ EXTERN_C const IID IID_IVim;
|
||||
virtual HRESULT STDMETHODCALLTYPE SetForeground( void) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE GetHwnd(
|
||||
/* [retval][out] */ UINT __RPC_FAR *result) = 0;
|
||||
/* [retval][out] */ UINT_PTR __RPC_FAR *result) = 0;
|
||||
|
||||
};
|
||||
|
||||
@@ -143,7 +143,7 @@ EXTERN_C const IID IID_IVim;
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetHwnd )(
|
||||
IVim __RPC_FAR * This,
|
||||
/* [retval][out] */ UINT __RPC_FAR *result);
|
||||
/* [retval][out] */ UINT_PTR __RPC_FAR *result);
|
||||
|
||||
END_INTERFACE
|
||||
} IVimVtbl;
|
||||
@@ -236,7 +236,7 @@ void __RPC_STUB IVim_SetForeground_Stub(
|
||||
|
||||
HRESULT STDMETHODCALLTYPE IVim_GetHwnd_Proxy(
|
||||
IVim __RPC_FAR * This,
|
||||
/* [retval][out] */ UINT __RPC_FAR *result);
|
||||
/* [retval][out] */ UINT_PTR __RPC_FAR *result);
|
||||
|
||||
|
||||
void __RPC_STUB IVim_GetHwnd_Stub(
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ interface IVim : IDispatch
|
||||
HRESULT SendKeys([in]BSTR keys);
|
||||
HRESULT Eval([in]BSTR expr, [out, retval]BSTR* result);
|
||||
HRESULT SetForeground(void);
|
||||
HRESULT GetHwnd([out, retval]UINT* result);
|
||||
HRESULT GetHwnd([out, retval]UINT_PTR* result);
|
||||
};
|
||||
|
||||
// Component and type library definitions
|
||||
|
||||
+4
-4
@@ -1605,15 +1605,15 @@ early_arg_scan(parmp)
|
||||
else if (STRICMP(argv[i], "--socketid") == 0)
|
||||
# endif
|
||||
{
|
||||
unsigned int id;
|
||||
int count;
|
||||
long_u id;
|
||||
int count;
|
||||
|
||||
if (i == argc - 1)
|
||||
mainerr_arg_missing((char_u *)argv[i]);
|
||||
if (STRNICMP(argv[i+1], "0x", 2) == 0)
|
||||
count = sscanf(&(argv[i + 1][2]), "%x", &id);
|
||||
count = sscanf(&(argv[i + 1][2]), SCANF_HEX_LONG_U, &id);
|
||||
else
|
||||
count = sscanf(argv[i+1], "%u", &id);
|
||||
count = sscanf(argv[i + 1], SCANF_DECIMAL_LONG_U, &id);
|
||||
if (count != 1)
|
||||
mainerr(ME_INVALID_ARG, (char_u *)argv[i]);
|
||||
else
|
||||
|
||||
+1
-1
@@ -522,7 +522,7 @@ fname2fnum(fm)
|
||||
int len;
|
||||
|
||||
expand_env((char_u *)"~/", NameBuff, MAXPATHL);
|
||||
len = STRLEN(NameBuff);
|
||||
len = (int)STRLEN(NameBuff);
|
||||
vim_strncpy(NameBuff + len, fm->fname + 2, MAXPATHL - len - 1);
|
||||
}
|
||||
else
|
||||
|
||||
+6
-2
@@ -751,7 +751,7 @@ vim_mem_profile_dump()
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Note: if unsinged is 16 bits we can only allocate up to 64K with alloc().
|
||||
* Note: if unsigned is 16 bits we can only allocate up to 64K with alloc().
|
||||
* Use lalloc for larger blocks.
|
||||
*/
|
||||
char_u *
|
||||
@@ -1082,7 +1082,11 @@ free_all_mem()
|
||||
win_free_all();
|
||||
#endif
|
||||
|
||||
/* Free all buffers. */
|
||||
/* Free all buffers. Reset 'autochdir' to avoid accessing things that
|
||||
* were freed already. */
|
||||
#ifdef FEAT_AUTOCHDIR
|
||||
p_acd = FALSE;
|
||||
#endif
|
||||
for (buf = firstbuf; buf != NULL; )
|
||||
{
|
||||
nextbuf = buf->b_next;
|
||||
|
||||
+3
-3
@@ -1216,7 +1216,7 @@ nb_partialremove(linenr_T lnum, colnr_T first, colnr_T last)
|
||||
int lastbyte = last;
|
||||
|
||||
oldtext = ml_get(lnum);
|
||||
oldlen = STRLEN(oldtext);
|
||||
oldlen = (int)STRLEN(oldtext);
|
||||
if (first >= (colnr_T)oldlen || oldlen == 0) /* just in case */
|
||||
return;
|
||||
if (lastbyte >= oldlen)
|
||||
@@ -1241,8 +1241,8 @@ nb_joinlines(linenr_T first, linenr_T other)
|
||||
int len_first, len_other;
|
||||
char_u *p;
|
||||
|
||||
len_first = STRLEN(ml_get(first));
|
||||
len_other = STRLEN(ml_get(other));
|
||||
len_first = (int)STRLEN(ml_get(first));
|
||||
len_other = (int)STRLEN(ml_get(other));
|
||||
p = alloc((unsigned)(len_first + len_other + 1));
|
||||
if (p != NULL)
|
||||
{
|
||||
|
||||
+4
-2
@@ -8364,6 +8364,7 @@ nv_wordcmd(cap)
|
||||
int n;
|
||||
int word_end;
|
||||
int flag = FALSE;
|
||||
pos_T startpos = curwin->w_cursor;
|
||||
|
||||
/*
|
||||
* Set inclusive for the "E" and "e" command.
|
||||
@@ -8424,8 +8425,9 @@ nv_wordcmd(cap)
|
||||
else
|
||||
n = fwd_word(cap->count1, cap->arg, cap->oap->op_type != OP_NOP);
|
||||
|
||||
/* Don't leave the cursor on the NUL past the end of line. */
|
||||
if (n != FAIL)
|
||||
/* Don't leave the cursor on the NUL past the end of line. Unless we
|
||||
* didn't move it forward. */
|
||||
if (lt(startpos, curwin->w_cursor))
|
||||
adjust_cursor(cap->oap);
|
||||
|
||||
if (n == FAIL && cap->oap->op_type == OP_NOP)
|
||||
|
||||
@@ -4380,7 +4380,7 @@ op_format(oap, keep_cursor)
|
||||
if (keep_cursor)
|
||||
saved_cursor = oap->cursor_start;
|
||||
|
||||
format_lines(oap->line_count);
|
||||
format_lines(oap->line_count, keep_cursor);
|
||||
|
||||
/*
|
||||
* Leave the cursor at the first non-blank of the last formatted line.
|
||||
@@ -4495,8 +4495,9 @@ fex_format(lnum, count, c)
|
||||
* first line.
|
||||
*/
|
||||
void
|
||||
format_lines(line_count)
|
||||
format_lines(line_count, avoid_fex)
|
||||
linenr_T line_count;
|
||||
int avoid_fex; /* don't use 'formatexpr' */
|
||||
{
|
||||
int max_len;
|
||||
int is_not_par; /* current line not part of parag. */
|
||||
@@ -4666,7 +4667,7 @@ format_lines(line_count)
|
||||
#ifdef FEAT_COMMENTS
|
||||
+ (do_comments ? INSCHAR_DO_COM : 0)
|
||||
#endif
|
||||
, second_indent);
|
||||
+ (avoid_fex ? INSCHAR_NO_FEX : 0), second_indent);
|
||||
State = old_State;
|
||||
p_smd = smd_save;
|
||||
second_indent = -1;
|
||||
|
||||
+2
-1
@@ -1856,7 +1856,8 @@ static struct vimoption
|
||||
},
|
||||
{"paragraphs", "para", P_STRING|P_VI_DEF,
|
||||
(char_u *)&p_para, PV_NONE,
|
||||
{(char_u *)"IPLPPPQPP LIpplpipbp", (char_u *)0L}},
|
||||
{(char_u *)"IPLPPPQPP TPHPLIPpLpItpplpipbp",
|
||||
(char_u *)0L}},
|
||||
{"paste", NULL, P_BOOL|P_VI_DEF|P_PRI_MKRC,
|
||||
(char_u *)&p_paste, PV_NONE,
|
||||
{(char_u *)FALSE, (char_u *)0L}},
|
||||
|
||||
+3
-2
@@ -269,8 +269,9 @@ static struct signalinfo
|
||||
#ifdef SIGVTALRM
|
||||
{SIGVTALRM, "VTALRM", TRUE},
|
||||
#endif
|
||||
#if defined(SIGPROF) && !defined(FEAT_MZSCHEME)
|
||||
/* MzScheme uses SIGPROF for its own needs */
|
||||
#if defined(SIGPROF) && !defined(FEAT_MZSCHEME) && !defined(WE_ARE_PROFILING)
|
||||
/* MzScheme uses SIGPROF for its own needs; On Linux with profiling
|
||||
* this makes Vim exit. WE_ARE_PROFILING is defined in Makefile. */
|
||||
{SIGPROF, "PROF", TRUE},
|
||||
#endif
|
||||
#ifdef SIGXCPU
|
||||
|
||||
+25
-6
@@ -2856,7 +2856,7 @@ handler_routine(
|
||||
windgoto((int)Rows - 1, 0);
|
||||
g_fForceExit = TRUE;
|
||||
|
||||
sprintf((char *)IObuff, _("Vim: Caught %s event\n"),
|
||||
vim_snprintf((char *)IObuff, IOSIZE, _("Vim: Caught %s event\n"),
|
||||
(dwCtrlType == CTRL_CLOSE_EVENT
|
||||
? _("close")
|
||||
: dwCtrlType == CTRL_LOGOFF_EVENT
|
||||
@@ -3282,12 +3282,13 @@ mch_call_shell(
|
||||
{
|
||||
/* we use "command" or "cmd" to start the shell; slow but easy */
|
||||
char_u *newcmd;
|
||||
|
||||
newcmd = lalloc((long_u) (
|
||||
long_u cmdlen = (
|
||||
#ifdef FEAT_GUI_W32
|
||||
STRLEN(vimrun_path) +
|
||||
#endif
|
||||
STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10), TRUE);
|
||||
STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10);
|
||||
|
||||
newcmd = lalloc(cmdlen, TRUE);
|
||||
if (newcmd != NULL)
|
||||
{
|
||||
char_u *cmdbase = (*cmd == '"' ? cmd + 1 : cmd);
|
||||
@@ -3373,14 +3374,15 @@ mch_call_shell(
|
||||
if (!s_dont_use_vimrun)
|
||||
/* Use vimrun to execute the command. It opens a console
|
||||
* window, which can be closed without killing Vim. */
|
||||
sprintf((char *)newcmd, "%s%s%s %s %s",
|
||||
vim_snprintf((char *)newcmd, cmdlen, "%s%s%s %s %s",
|
||||
vimrun_path,
|
||||
(msg_silent != 0 || (options & SHELL_DOOUT))
|
||||
? "-s " : "",
|
||||
p_sh, p_shcf, cmd);
|
||||
else
|
||||
#endif
|
||||
sprintf((char *)newcmd, "%s %s %s", p_sh, p_shcf, cmd);
|
||||
vim_snprintf((char *)newcmd, cmdlen, "%s %s %s",
|
||||
p_sh, p_shcf, cmd);
|
||||
x = mch_system((char *)newcmd, options);
|
||||
}
|
||||
vim_free(newcmd);
|
||||
@@ -4664,12 +4666,29 @@ mch_fopen(char *name, char *mode)
|
||||
# endif
|
||||
)
|
||||
{
|
||||
# if defined(DEBUG) && _MSC_VER > 1200
|
||||
/* Work around an annoying assertion in the Microsoft debug CRT
|
||||
* when mode's text/binary setting doesn't match _get_fmode(). */
|
||||
char newMode = mode[strlen(mode) - 1];
|
||||
int oldMode = 0;
|
||||
|
||||
_get_fmode(&oldMode);
|
||||
if (newMode == 't')
|
||||
_set_fmode(_O_TEXT);
|
||||
else if (newMode == 'b')
|
||||
_set_fmode(_O_BINARY);
|
||||
# endif
|
||||
wn = enc_to_ucs2(name, NULL);
|
||||
wm = enc_to_ucs2(mode, NULL);
|
||||
if (wn != NULL && wm != NULL)
|
||||
f = _wfopen(wn, wm);
|
||||
vim_free(wn);
|
||||
vim_free(wm);
|
||||
|
||||
# if defined(DEBUG) && _MSC_VER > 1200
|
||||
_set_fmode(oldMode);
|
||||
# endif
|
||||
|
||||
if (f != NULL)
|
||||
return f;
|
||||
/* Retry with non-wide function (for Windows 98). Can't use
|
||||
|
||||
+1
-1
@@ -337,7 +337,7 @@ pum_redraw()
|
||||
|
||||
if (rt != NULL)
|
||||
{
|
||||
len = STRLEN(rt);
|
||||
len = (int)STRLEN(rt);
|
||||
if (len > pum_width)
|
||||
{
|
||||
for (j = pum_width; j < len; ++j)
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ int do_join __ARGS((int insert_space));
|
||||
void op_format __ARGS((oparg_T *oap, int keep_cursor));
|
||||
void op_formatexpr __ARGS((oparg_T *oap));
|
||||
int fex_format __ARGS((linenr_T lnum, long count, int c));
|
||||
void format_lines __ARGS((linenr_T line_count));
|
||||
void format_lines __ARGS((linenr_T line_count, int avoid_fex));
|
||||
int paragraph_start __ARGS((linenr_T lnum));
|
||||
int do_addsub __ARGS((int command, linenr_T Prenum1));
|
||||
int read_viminfo_register __ARGS((vir_T *virp, int force));
|
||||
|
||||
@@ -106,7 +106,9 @@ struct efm_S
|
||||
|
||||
static int qf_init_ext __ARGS((qf_info_T *qi, char_u *efile, buf_T *buf, typval_T *tv, char_u *errorformat, int newlist, linenr_T lnumfirst, linenr_T lnumlast));
|
||||
static void qf_new_list __ARGS((qf_info_T *qi));
|
||||
static void ll_free_all __ARGS((qf_info_T **pqi));
|
||||
static int qf_add_entry __ARGS((qf_info_T *qi, qfline_T **prevp, char_u *dir, char_u *fname, int bufnum, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid));
|
||||
static qf_info_T *ll_new_list __ARGS((void));
|
||||
static void qf_msg __ARGS((qf_info_T *qi));
|
||||
static void qf_free __ARGS((qf_info_T *qi, int idx));
|
||||
static char_u *qf_types __ARGS((int, int));
|
||||
|
||||
+1
-1
@@ -4527,7 +4527,7 @@ win_line(wp, lnum, startrow, endrow, nochange)
|
||||
#endif
|
||||
col == W_WIDTH(wp) - 1)
|
||||
&& (*ptr != NUL
|
||||
|| (wp->w_p_list && lcs_eol != NUL && p_extra != at_end_str)
|
||||
|| (wp->w_p_list && lcs_eol_one > 0)
|
||||
|| (n_extra && (c_extra != NUL || *p_extra != NUL))))
|
||||
{
|
||||
c = lcs_ext;
|
||||
|
||||
+4
-1
@@ -547,7 +547,10 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use, stop_lnum, tm)
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
if (options & SEARCH_START)
|
||||
/* When not accepting a match at the start position set "extra_col" to a
|
||||
* non-zero value. Don't do that when starting at MAXCOL, since MAXCOL +
|
||||
* 1 is zero. */
|
||||
if ((options & SEARCH_START) || pos->col == MAXCOL)
|
||||
extra_col = 0;
|
||||
#ifdef FEAT_MBYTE
|
||||
/* Watch out for the "col" being MAXCOL - 2, used in a closed fold. */
|
||||
|
||||
+10
-6
@@ -2268,6 +2268,8 @@ spell_move_to(wp, dir, allwords, curline, attrp)
|
||||
/*
|
||||
* For spell checking: concatenate the start of the following line "line" into
|
||||
* "buf", blanking-out special characters. Copy less then "maxlen" bytes.
|
||||
* Keep the blanks at the start of the next line, this is used in win_line()
|
||||
* to skip those bytes if the word was OK.
|
||||
*/
|
||||
void
|
||||
spell_cat_line(buf, line, maxlen)
|
||||
@@ -2284,12 +2286,14 @@ spell_cat_line(buf, line, maxlen)
|
||||
|
||||
if (*p != NUL)
|
||||
{
|
||||
*buf = ' ';
|
||||
vim_strncpy(buf + 1, line, maxlen - 2);
|
||||
n = (int)(p - line);
|
||||
if (n >= maxlen)
|
||||
n = maxlen - 1;
|
||||
vim_memset(buf + 1, ' ', n);
|
||||
/* Only worth concatenating if there is something else than spaces to
|
||||
* concatenate. */
|
||||
n = (int)(p - line) + 1;
|
||||
if (n < maxlen - 1)
|
||||
{
|
||||
vim_memset(buf, ' ', n);
|
||||
vim_strncpy(buf + n, p, maxlen - 1 - n);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -681,6 +681,54 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
291,
|
||||
/**/
|
||||
290,
|
||||
/**/
|
||||
289,
|
||||
/**/
|
||||
288,
|
||||
/**/
|
||||
287,
|
||||
/**/
|
||||
286,
|
||||
/**/
|
||||
285,
|
||||
/**/
|
||||
284,
|
||||
/**/
|
||||
283,
|
||||
/**/
|
||||
282,
|
||||
/**/
|
||||
281,
|
||||
/**/
|
||||
280,
|
||||
/**/
|
||||
279,
|
||||
/**/
|
||||
278,
|
||||
/**/
|
||||
277,
|
||||
/**/
|
||||
276,
|
||||
/**/
|
||||
275,
|
||||
/**/
|
||||
274,
|
||||
/**/
|
||||
273,
|
||||
/**/
|
||||
272,
|
||||
/**/
|
||||
271,
|
||||
/**/
|
||||
270,
|
||||
/**/
|
||||
269,
|
||||
/**/
|
||||
268,
|
||||
/**/
|
||||
267,
|
||||
/**/
|
||||
|
||||
@@ -356,16 +356,19 @@ typedef unsigned int int_u;
|
||||
* On Win64 longs are 32 bit and pointers 64 bit.
|
||||
* For printf() and scanf() we need to take care of long_u specifically. */
|
||||
#ifdef _WIN64
|
||||
typedef unsigned __int64 long_u;
|
||||
typedef __int64 long_i;
|
||||
# define SCANF_HEX_LONG_U "%Ix"
|
||||
# define PRINTF_HEX_LONG_U "0x%Ix"
|
||||
typedef unsigned __int64 long_u;
|
||||
typedef __int64 long_i;
|
||||
# define SCANF_HEX_LONG_U "%Ix"
|
||||
# define SCANF_DECIMAL_LONG_U "%Iu"
|
||||
# define PRINTF_HEX_LONG_U "0x%Ix"
|
||||
#else
|
||||
typedef unsigned long long_u;
|
||||
typedef long long_i;
|
||||
# define SCANF_HEX_LONG_U "%lx"
|
||||
# define PRINTF_HEX_LONG_U "0x%lx"
|
||||
typedef unsigned long long_u;
|
||||
typedef long long_i;
|
||||
# define SCANF_HEX_LONG_U "%lx"
|
||||
# define SCANF_DECIMAL_LONG_U "%lu"
|
||||
# define PRINTF_HEX_LONG_U "0x%lx"
|
||||
#endif
|
||||
#define PRINTF_DECIMAL_LONG_U SCANF_DECIMAL_LONG_U
|
||||
|
||||
/*
|
||||
* The characters and attributes cached for the screen.
|
||||
@@ -462,9 +465,10 @@ typedef unsigned long u8char_T; /* long should be 32 bits or more */
|
||||
/*
|
||||
* Check input method control.
|
||||
*/
|
||||
#if defined(FEAT_XIM) || \
|
||||
(defined(FEAT_GUI) && (defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME))) \
|
||||
|| defined(FEAT_GUI_MACVIM)
|
||||
#if defined(FEAT_XIM) \
|
||||
|| (defined(FEAT_GUI) && (defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME))) \
|
||||
|| (defined(FEAT_GUI_MAC) && defined(FEAT_MBYTE)) \
|
||||
|| defined(FEAT_GUI_MACVIM)
|
||||
# define USE_IM_CONTROL
|
||||
#endif
|
||||
|
||||
@@ -951,6 +955,7 @@ extern char *(*dyn_libintl_textdomain)(const char *domainname);
|
||||
#define INSCHAR_FORMAT 1 /* force formatting */
|
||||
#define INSCHAR_DO_COM 2 /* format comments */
|
||||
#define INSCHAR_CTRLV 4 /* char typed just after CTRL-V */
|
||||
#define INSCHAR_NO_FEX 8 /* don't use 'formatexpr' */
|
||||
|
||||
/* flags for open_line() */
|
||||
#define OPENLINE_DELSPACES 1 /* delete spaces after cursor */
|
||||
|
||||
+1
-1
@@ -6303,7 +6303,7 @@ match_add(wp, grp, pat, prio, id)
|
||||
cur = cur->next;
|
||||
}
|
||||
}
|
||||
if ((hlg_id = syn_namen2id(grp, STRLEN(grp))) == 0)
|
||||
if ((hlg_id = syn_namen2id(grp, (int)STRLEN(grp))) == 0)
|
||||
{
|
||||
EMSG2(_(e_nogroup), grp);
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user