Compare commits

..

15 Commits

Author SHA1 Message Date
Bram Moolenaar
9fb0e137ec updated for version 7.0-015 2006-05-13 13:51:38 +00:00
Bram Moolenaar
6a1a37028e updated for version 7.0-014 2006-05-13 13:41:03 +00:00
Bram Moolenaar
0440ca3371 updated for version 7.0-013 2006-05-13 13:24:33 +00:00
Bram Moolenaar
2347f062fb updated for version 7.0-012 2006-05-13 12:48:30 +00:00
Bram Moolenaar
2e97890d67 updated for version 7.0-011 2006-05-13 12:37:50 +00:00
Bram Moolenaar
c9a99918bd updated for version 7.0-010 2006-05-13 12:25:55 +00:00
Bram Moolenaar
5dd95a1058 updated for version 7.0-009 2006-05-13 12:09:24 +00:00
Bram Moolenaar
86c9ee2182 updated for version 7.0-008 2006-05-13 11:33:27 +00:00
Bram Moolenaar
223b4313c8 updated for version 7.0-007 2006-05-13 11:09:22 +00:00
Bram Moolenaar
70fc52750a updated for version 7.0-006 2006-05-13 10:55:25 +00:00
Bram Moolenaar
408b585732 updated for version 7.0-005 2006-05-13 10:44:07 +00:00
Bram Moolenaar
b4872945fd updated for version 7.0-004 2006-05-13 10:32:52 +00:00
Bram Moolenaar
8798be0e96 updated for version 7.0-003 2006-05-13 10:11:39 +00:00
Bram Moolenaar
862c27a03c updated for version 7.0-002 2006-05-13 09:09:15 +00:00
Bram Moolenaar
28e4c8d9f0 updated for version 7.0-001 2006-05-09 16:15:42 +00:00
15 changed files with 150 additions and 68 deletions

View File

@@ -391,6 +391,7 @@ Section Uninstall
ClearErrors
# Remove everything but *.dll files. Avoids that
# a lot remains when gvimext.dll cannot be deleted.
RMDir /r $0\autoload
RMDir /r $0\colors
RMDir /r $0\compiler
RMDir /r $0\doc
@@ -398,6 +399,7 @@ Section Uninstall
RMDir /r $0\indent
RMDir /r $0\macros
RMDir /r $0\plugin
RMDir /r $0\spell
RMDir /r $0\syntax
RMDir /r $0\tools
RMDir /r $0\tutor

View File

@@ -1,7 +1,7 @@
" Vim completion script
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 May 03
" Last Change: 2006 May 08
" This function is used for the 'omnifunc' option.
@@ -458,7 +458,7 @@ endfunction
" member.
function! s:StructMembers(typename, items, all)
" Todo: What about local structures?
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
if fnames == ''
return []
endif

View File

@@ -1,9 +1,9 @@
" Vim script to download a missing spell file
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Feb 01
" Last Change: 2006 May 10
if !exists('g:spellfile_URL')
let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/unstable/runtime/spell'
let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/runtime/spell'
endif
let s:spellfile_URL = '' " Start with nothing so that s:donedict is reset.
@@ -61,13 +61,13 @@ function! spellfile#LoadFile(lang)
new
setlocal bin
echo 'Downloading ' . fname . '...'
exe 'Nread ' g:spellfile_URL . '/' . fname
call spellfile#Nread(fname)
if getline(2) !~ 'VIMspell'
" Didn't work, perhaps there is an ASCII one.
g/^/d
let fname = a:lang . '.ascii.spl'
echo 'Could not find it, trying ' . fname . '...'
exe 'Nread ' g:spellfile_URL . '/' . fname
call spellfile#Nread(fname)
if getline(2) !~ 'VIMspell'
echo 'Sorry, downloading failed'
bwipe!
@@ -95,7 +95,7 @@ function! spellfile#LoadFile(lang)
g/^/d
let fname = substitute(fname, '\.spl$', '.sug', '')
echo 'Downloading ' . fname . '...'
exe 'Nread ' g:spellfile_URL . '/' . fname
call spellfile#Nread(fname)
if getline(2) !~ 'VIMsug'
echo 'Sorry, downloading failed'
else
@@ -109,3 +109,10 @@ function! spellfile#LoadFile(lang)
bwipe
endif
endfunc
" Read "fname" from the ftp server.
function! spellfile#Nread(fname)
let machine = substitute(g:spellfile_URL, 'ftp://\([^/]*\).*', '\1', '')
let dir = substitute(g:spellfile_URL, 'ftp://[^/]*/\(.*\)', '\1', '')
exe 'Nread "' . machine . ' anonymous vim7user ' . dir . '/' . a:fname . '"'
endfunc

View File

@@ -1,6 +1,6 @@
" Vim plugin for showing matching parens
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Apr 27
" Last Change: 2006 May 11
" Exit quickly when:
" - this plugin was already loaded (or disabled)
@@ -90,7 +90,7 @@ function! s:Highlight_Matching_Pair()
" Find the match. When it was just before the cursor move it there for a
" moment.
if before > 0
let save_cursor = getpos('.')
let save_cursor = winsaveview()
call cursor(c_lnum, c_col - before)
endif
@@ -102,7 +102,7 @@ function! s:Highlight_Matching_Pair()
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline)
if before > 0
call setpos('.', save_cursor)
call winrestview(save_cursor)
endif
" If a match is found setup match highlighting.

View File

@@ -2177,6 +2177,7 @@ shadow: runtime pixmaps
cd $(SHADOWDIR)/xxd; ln -s ../../xxd/*.[ch] ../../xxd/Make* .
if test -d $(RSRC_DIR); then \
cd $(SHADOWDIR); \
ln -s ../infplist.xml .; \
ln -s ../$(RSRC_DIR) ../os_mac.rsr.hqx ../dehqx.py .; \
fi
mkdir $(SHADOWDIR)/testdir

View File

@@ -751,7 +751,7 @@ edit(cmdchar, startln, count)
continue;
}
/* Pressing CTRL-Y selects the current match. Shen
/* Pressing CTRL-Y selects the current match. When
* compl_enter_selects is set the Enter key does the same. */
if (c == Ctrl_Y || (compl_enter_selects
&& (c == CAR || c == K_KENTER || c == NL)))
@@ -3046,7 +3046,6 @@ ins_compl_new_leader()
ins_compl_delete();
ins_bytes(compl_leader + curwin->w_cursor.col - compl_col);
compl_used_match = FALSE;
compl_enter_selects = FALSE;
if (compl_started)
ins_compl_set_original_text(compl_leader);
@@ -3076,6 +3075,7 @@ ins_compl_new_leader()
compl_restarting = FALSE;
}
#if 0 /* disabled, made CTRL-L, BS and typing char jump to original text. */
if (!compl_used_match)
{
/* Go to the original text, since none of the matches is inserted. */
@@ -3087,6 +3087,8 @@ ins_compl_new_leader()
compl_curr_match = compl_shown_match;
compl_shows_dir = compl_direction;
}
#endif
compl_enter_selects = !compl_used_match;
/* Show the popup menu with a different set of matches. */
ins_compl_show_pum();
@@ -3175,10 +3177,32 @@ ins_compl_addfrommatch()
char_u *p;
int len = curwin->w_cursor.col - compl_col;
int c;
compl_T *cp;
p = compl_shown_match->cp_str;
if ((int)STRLEN(p) <= len) /* the match is too short */
return;
{
/* When still at the original match use the first entry that matches
* the leader. */
if (compl_shown_match->cp_flags & ORIGINAL_TEXT)
{
p = NULL;
for (cp = compl_shown_match->cp_next; cp != NULL
&& cp != compl_first_match; cp = cp->cp_next)
{
if (ins_compl_equal(cp, compl_leader,
(int)STRLEN(compl_leader)))
{
p = cp->cp_str;
break;
}
}
if (p == NULL || (int)STRLEN(p) <= len)
return;
}
else
return;
}
p += len;
#ifdef FEAT_MBYTE
c = mb_ptr2char(p);
@@ -4100,6 +4124,21 @@ ins_compl_next(allow_get_expansion, count, insert_match)
&& compl_shown_match->cp_next != NULL
&& compl_shown_match->cp_next != compl_first_match)
compl_shown_match = compl_shown_match->cp_next;
/* If we didn't find it searching forward, and compl_shows_dir is
* backward, find the last match. */
if (compl_shows_dir == BACKWARD
&& !ins_compl_equal(compl_shown_match,
compl_leader, (int)STRLEN(compl_leader))
&& (compl_shown_match->cp_next == NULL
|| compl_shown_match->cp_next == compl_first_match))
{
while (!ins_compl_equal(compl_shown_match,
compl_leader, (int)STRLEN(compl_leader))
&& compl_shown_match->cp_prev != NULL
&& compl_shown_match->cp_prev != compl_first_match)
compl_shown_match = compl_shown_match->cp_prev;
}
}
if (allow_get_expansion && insert_match

View File

@@ -11372,7 +11372,7 @@ f_input(argvars, rettv)
if (argvars[2].v_type != VAR_UNKNOWN)
{
char_u *xp_name;
int xp_namelen;
int xp_namelen;
long argt;
rettv->vval.v_string = NULL;
@@ -18963,7 +18963,8 @@ trans_function_name(pp, skip, flags, fdp)
else if (lead > 0)
{
lead = 3;
if (eval_fname_sid(lv.ll_exp_name != NULL ? lv.ll_exp_name : *pp))
if ((lv.ll_exp_name != NULL && eval_fname_sid(lv.ll_exp_name))
|| eval_fname_sid(*pp))
{
/* It's "s:" or "<SID>" */
if (current_SID <= 0)

View File

@@ -833,7 +833,7 @@ do_cmdline(cmdline, getline, cookie, flags)
* If requested, store and reset the global values controlling the
* exception handling (used when debugging).
*/
else if (flags & DOCMD_EXCRESET)
if (flags & DOCMD_EXCRESET)
save_dbg_stuff(&debug_saved);
initial_trylevel = trylevel;

View File

@@ -4603,11 +4603,11 @@ gui_mouse_correct()
/* Don't move the mouse when it's left or right of the Vim window */
if (x < 0 || x > Columns * gui.char_width)
return;
if (y >= 0
# ifdef FEAT_WINDOWS
if (Y_2_ROW(y) >= tabline_height())
# else
if (y >= 0)
&& Y_2_ROW(y) >= tabline_height()
# endif
)
wp = xy2win(x, y);
if (wp != curwin && wp != NULL) /* If in other than current window */
{

View File

@@ -1861,27 +1861,27 @@ SFvAreaSelectedCallback(w, n, pnew)
XtPointer pnew;
{
SFDir *dir;
int nw;
int nw = (int)(long)pnew;
dir = &(SFdirs[SFdirPtr + (int)(long)n]);
#ifdef FEAT_GUI_NEXTAW
if ((int)(long)pnew < 0)
if (nw < 0)
{
if ((int)(long)pnew > -SFvScrollHeight)
(int)(long)pnew = -1;
if (nw > -SFvScrollHeight)
nw = -1;
else
(int)(long)pnew = -SFlistSize;
nw = -SFlistSize;
}
else if ((int)(long)pnew > 0)
else if (nw > 0)
{
if ((int)(long)pnew < SFvScrollHeight)
(int)(long)pnew = 1;
if (nw < SFvScrollHeight)
nw = 1;
else
(int)(long)pnew = SFlistSize;
nw = SFlistSize;
}
#endif
nw = dir->vOrigin + (int)(long)pnew;
nw += dir->vOrigin;
if (nw > dir->nEntries - SFlistSize)
nw = dir->nEntries - SFlistSize;
@@ -1941,27 +1941,27 @@ SFhAreaSelectedCallback(w, n, pnew)
XtPointer pnew;
{
SFDir *dir;
int nw;
int nw = (int)(long)pnew;
dir = &(SFdirs[SFdirPtr + (int)(long)n]);
#ifdef FEAT_GUI_NEXTAW
if ((int)(long)pnew < 0)
if (nw < 0)
{
if ((int)(long)pnew > -SFhScrollWidth)
(int)(long)pnew = -1;
if (nw > -SFhScrollWidth)
nw = -1;
else
(int)(long)pnew = -SFcharsPerEntry;
nw = -SFcharsPerEntry;
}
else if ((int)(long)pnew > 0)
else if (nw > 0)
{
if ((int)(long)pnew < SFhScrollWidth)
(int)(long)pnew = 1;
if (nw < SFhScrollWidth)
nw = 1;
else
(int)(long)pnew = SFcharsPerEntry;
nw = SFcharsPerEntry;
}
#endif
nw = dir->hOrigin + (int)(long)pnew;
nw += dir->hOrigin;
if (nw > dir->nChars - SFcharsPerEntry)
nw = dir->nChars - SFcharsPerEntry;
@@ -2038,26 +2038,26 @@ SFpathAreaSelectedCallback(w, client_data, pnew)
XtPointer client_data;
XtPointer pnew;
{
int nw;
int nw = (int)(long)pnew;
float f;
#ifdef FEAT_GUI_NEXTAW
if ((int)(long)pnew < 0)
if (nw < 0)
{
if ((int)(long)pnew > -SFpathScrollWidth)
(int)(long)pnew = -1;
if (nw > -SFpathScrollWidth)
nw = -1;
else
(int)(long)pnew = -3;
nw = -3;
}
else if ((int)(long)pnew > 0)
else if (nw > 0)
{
if ((int)(long)pnew < SFpathScrollWidth)
(int)(long)pnew = 1;
if (nw < SFpathScrollWidth)
nw = 1;
else
(int)(long)pnew = 3;
nw = 3;
}
#endif
nw = SFdirPtr + (int)(long)pnew;
nw += SFdirPtr;
if (nw > SFdirEnd - 3)
nw = SFdirEnd - 3;

View File

@@ -480,7 +480,7 @@ draw_shadows(XmEnhancedButtonWidget eb)
|| (eb->core.height <= 2 * eb->primitive.highlight_thickness))
return;
#ifndef LESSTIF_VERSION
#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
{
XmDisplay dpy;
@@ -641,7 +641,7 @@ draw_label(XmEnhancedButtonWidget eb, XEvent *event, Region region)
GC tmp_gc = NULL;
Boolean replaceGC = False;
Boolean deadjusted = False;
#ifndef LESSTIF_VERSION
#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
XmDisplay dpy = (XmDisplay)XmGetXmDisplay(XtDisplay(eb));
Boolean etched_in = dpy->display.enable_etched_in_menu;
#else
@@ -726,7 +726,7 @@ Enter(Widget wid, XEvent *event, String *params, Cardinal *num_params)
if ((((ShellWidget) XtParent(XtParent(eb)))->shell.popped_up)
&& _XmGetInDragMode((Widget) eb))
{
#ifndef LESSTIF_VERSION
#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
XmDisplay dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(wid));
Boolean etched_in = dpy->display.enable_etched_in_menu;
#else
@@ -810,7 +810,7 @@ Leave(Widget wid, XEvent *event, String *params, Cardinal *num_params)
if (Lab_IsMenupane(eb))
{
#ifndef LESSTIF_VERSION
#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
XmDisplay dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(wid));
Boolean etched_in = dpy->display.enable_etched_in_menu;
#else
@@ -1150,7 +1150,7 @@ SetValues(Widget current, Widget request, Widget new, ArgList args, Cardinal *n)
Redisplay(Widget w, XEvent *event, Region region)
{
XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget) w;
#ifndef LESSTIF_VERSION
#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
XmDisplay dpy;
XtEnum default_button_emphasis;
#endif
@@ -1162,7 +1162,7 @@ Redisplay(Widget w, XEvent *event, Region region)
if (!XtIsRealized((Widget)eb))
return;
#ifndef LESSTIF_VERSION
#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
dpy = (XmDisplay)XmGetXmDisplay(XtDisplay(eb));
default_button_emphasis = dpy->display.default_button_emphasis;
#endif
@@ -1241,7 +1241,7 @@ Redisplay(Widget w, XEvent *event, Region region)
{
int adjust = 0;
#ifndef LESSTIF_VERSION
#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
/*
* NOTE: PushButton has two types of shadows: primitive-shadow and
* default-button-shadow. If pushbutton is in a menu only primitive
@@ -1289,7 +1289,7 @@ Redisplay(Widget w, XEvent *event, Region region)
adjust, adjust, rectwidth, rectheight, borderwidth);
}
#ifndef LESSTIF_VERSION
#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
switch (default_button_emphasis)
{
case XmINTERNAL_HIGHLIGHT:
@@ -1365,7 +1365,7 @@ Redisplay(Widget w, XEvent *event, Region region)
default_button_shadow_thickness =
eb->pushbutton.default_button_shadow_thickness;
#ifndef LESSTIF_VERSION
#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
/*
* Compute location of bounding box to contain the
* defaultButtonShadow.

View File

@@ -4175,15 +4175,16 @@ vim_snprintf(str, str_m, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
str_arg_l = 0;
else
{
/* Don't put the #if inside memchr(), it can be a
* macro. */
#if SIZEOF_INT <= 2
char *q = memchr(str_arg, '\0', precision);
#else
/* memchr on HP does not like n > 2^31 !!! */
char *q = memchr(str_arg, '\0',
#if SIZEOF_INT <= 2
precision
#else
precision <= (size_t)0x7fffffffL ? precision
: (size_t)0x7fffffffL
precision <= (size_t)0x7fffffffL ? precision
: (size_t)0x7fffffffL);
#endif
);
str_arg_l = (q == NULL) ? precision : q - str_arg;
}
break;

View File

@@ -2294,7 +2294,7 @@ static struct vimoption
{(char_u *)0L, (char_u *)0L}
#endif
},
{"spellsuggest", "sps", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE,
{"spellsuggest", "sps", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE|P_COMMA,
#ifdef FEAT_SPELL
(char_u *)&p_sps, PV_NONE,
{(char_u *)"best", (char_u *)0L}
@@ -5227,13 +5227,13 @@ insecure_flag(opt_idx, opt_flags)
case PV_STL: return &curwin->w_p_stl_flags;
#endif
#ifdef FEAT_EVAL
# ifdef FEAT_FOLDING
case PV_FDE: return &curwin->w_p_fde_flags;
case PV_FDT: return &curwin->w_p_fdt_flags;
# endif
# ifdef FEAT_BEVAL
case PV_BEXPR: return &curbuf->b_p_bexpr_flags;
# endif
#endif
#if defined(FEAT_EVAL)
# if defined(FEAT_CINDENT)
case PV_INDE: return &curbuf->b_p_inde_flags;
# endif

View File

@@ -2108,7 +2108,8 @@ spell_move_to(wp, dir, allwords, curline, attrp)
* possible. */
STRCPY(buf, line);
if (lnum < wp->w_buffer->b_ml.ml_line_count)
spell_cat_line(buf + STRLEN(buf), ml_get(lnum + 1), MAXWLEN);
spell_cat_line(buf + STRLEN(buf),
ml_get_buf(wp->w_buffer, lnum + 1, FALSE), MAXWLEN);
p = buf + skip;
endp = buf + len;

View File

@@ -666,6 +666,36 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
15,
/**/
14,
/**/
13,
/**/
12,
/**/
11,
/**/
10,
/**/
9,
/**/
8,
/**/
7,
/**/
6,
/**/
5,
/**/
4,
/**/
3,
/**/
2,
/**/
1,
/**/
0
};