mirror of
https://github.com/vim/vim
synced 2025-07-16 01:01:58 +00:00
updated for version 7.0027
This commit is contained in:
2
Filelist
2
Filelist
@ -153,6 +153,7 @@ SRC_UNIX = \
|
|||||||
src/gui_kde_x11.cc \
|
src/gui_kde_x11.cc \
|
||||||
src/kvim_iface.h \
|
src/kvim_iface.h \
|
||||||
src/gui_motif.c \
|
src/gui_motif.c \
|
||||||
|
src/gui_xmdlg.c \
|
||||||
src/gui_x11.c \
|
src/gui_x11.c \
|
||||||
src/hangulin.c \
|
src/hangulin.c \
|
||||||
src/if_xcmdsrv.c \
|
src/if_xcmdsrv.c \
|
||||||
@ -175,6 +176,7 @@ SRC_UNIX = \
|
|||||||
src/proto/gui_kde.pro \
|
src/proto/gui_kde.pro \
|
||||||
src/proto/gui_kde_x11.pro \
|
src/proto/gui_kde_x11.pro \
|
||||||
src/proto/gui_motif.pro \
|
src/proto/gui_motif.pro \
|
||||||
|
src/proto/gui_xmdlg.pro \
|
||||||
src/proto/gui_x11.pro \
|
src/proto/gui_x11.pro \
|
||||||
src/proto/hangulin.pro \
|
src/proto/hangulin.pro \
|
||||||
src/proto/if_xcmdsrv.pro \
|
src/proto/if_xcmdsrv.pro \
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
" Vim support file to detect file types
|
" Vim support file to detect file types
|
||||||
"
|
"
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2004 Dec 17
|
" Last Change: 2004 Dec 31
|
||||||
|
|
||||||
" Listen very carefully, I will say this only once
|
" Listen very carefully, I will say this only once
|
||||||
if exists("did_load_filetypes")
|
if exists("did_load_filetypes")
|
||||||
@ -236,7 +236,7 @@ au BufNewFile,BufRead *.bdf setf bdf
|
|||||||
au BufNewFile,BufRead *.bib setf bib
|
au BufNewFile,BufRead *.bib setf bib
|
||||||
|
|
||||||
" BIND configuration
|
" BIND configuration
|
||||||
au BufNewFile,BufRead named.conf setf named
|
au BufNewFile,BufRead named.conf,rndc.conf setf named
|
||||||
|
|
||||||
" BIND zone
|
" BIND zone
|
||||||
au BufNewFile,BufRead named.root setf bindzone
|
au BufNewFile,BufRead named.root setf bindzone
|
||||||
@ -1748,7 +1748,7 @@ au BufNewFile,BufRead *termcap*
|
|||||||
au BufNewFile,BufRead *vimrc* setf vim
|
au BufNewFile,BufRead *vimrc* setf vim
|
||||||
|
|
||||||
" Subversion commit file
|
" Subversion commit file
|
||||||
au BufNewFile,BufRead svn-commit.*.tmp setf svn
|
au BufNewFile,BufRead svn-commit*.tmp setf svn
|
||||||
|
|
||||||
" X resources file
|
" X resources file
|
||||||
au BufNewFile,BufRead Xresources*,*/app-defaults/*,*/Xresources/* setf xdefaults
|
au BufNewFile,BufRead Xresources*,*/app-defaults/*,*/Xresources/* setf xdefaults
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
" Language: SPEC: Build/install scripts for Linux RPM packages
|
" Language: SPEC: Build/install scripts for Linux RPM packages
|
||||||
" Maintainer: Donovan Rebbechi elflord@pegasus.rutgers.edu
|
" Maintainer: Donovan Rebbechi elflord@pegasus.rutgers.edu
|
||||||
" URL: http://pegasus.rutgers.edu/~elflord/vim/syntax/spec.vim
|
" URL: http://pegasus.rutgers.edu/~elflord/vim/syntax/spec.vim
|
||||||
" Last Change: Tue Oct 3 17:35:15 BRST 2000 <aurelio@conectiva.com.br>
|
" Last Change: Fri Dec 3 11:54 EST 2004 Martin Dalecki
|
||||||
|
|
||||||
" For version 5.x: Clear all syntax items
|
" For version 5.x: Clear all syntax items
|
||||||
" For version 6.x: Quit when a syntax file was already loaded
|
" For version 6.x: Quit when a syntax file was already loaded
|
||||||
@ -82,8 +82,8 @@ syn keyword specMacroNameLocal contained _arch _binary_payload _bindir _build _b
|
|||||||
" Scripts, Files and Changelog
|
" Scripts, Files and Changelog
|
||||||
|
|
||||||
"One line macros - valid in all ScriptAreas
|
"One line macros - valid in all ScriptAreas
|
||||||
"tip: remember do include new itens on specScriptArea's skip section
|
"tip: remember do include new items on specScriptArea's skip section
|
||||||
syn region specSectionMacroArea oneline matchgroup=specSectionMacro start='^%\(define\|patch\d*\|setup\|configure\|GNUconfigure\|find_lang\|makeinstall\)\>' end='$' contains=specCommandOpts,specMacroIdentifier
|
syn region specSectionMacroArea oneline matchgroup=specSectionMacro start='^%\(define\|patch\d*\|setup\|configure\|GNUconfigure\|find_lang\|makeinstall\|include\)\>' end='$' contains=specCommandOpts,specMacroIdentifier
|
||||||
syn region specSectionMacroBracketArea oneline matchgroup=specSectionMacro start='^%{\(configure\|GNUconfigure\|find_lang\|makeinstall\)}' end='$' contains=specCommandOpts,specMacroIdentifier
|
syn region specSectionMacroBracketArea oneline matchgroup=specSectionMacro start='^%{\(configure\|GNUconfigure\|find_lang\|makeinstall\)}' end='$' contains=specCommandOpts,specMacroIdentifier
|
||||||
|
|
||||||
"%% Files Section %%
|
"%% Files Section %%
|
||||||
|
@ -6548,10 +6548,12 @@ get_mess_lang()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(LC_MESSAGES) \
|
/* Complicated #if; matches with where get_mess_env() is used below. */
|
||||||
&& (((defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
|
#if (defined(FEAT_EVAL) && !((defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
|
||||||
&& (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE))) \
|
&& defined(LC_MESSAGES))) \
|
||||||
|| defined(FEAT_EVAL))
|
|| ((defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
|
||||||
|
&& (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) \
|
||||||
|
&& !defined(LC_MESSAGES))
|
||||||
static char_u *get_mess_env __ARGS((void));
|
static char_u *get_mess_env __ARGS((void));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
24
src/fold.c
24
src/fold.c
@ -2001,6 +2001,7 @@ foldtext_cleanup(str)
|
|||||||
char_u *cms_end; /* last part of the comment or NULL */
|
char_u *cms_end; /* last part of the comment or NULL */
|
||||||
int cms_elen = 0; /* length of cms_end */
|
int cms_elen = 0; /* length of cms_end */
|
||||||
char_u *s;
|
char_u *s;
|
||||||
|
char_u *p;
|
||||||
int len;
|
int len;
|
||||||
int did1 = FALSE;
|
int did1 = FALSE;
|
||||||
int did2 = FALSE;
|
int did2 = FALSE;
|
||||||
@ -2033,25 +2034,34 @@ foldtext_cleanup(str)
|
|||||||
{
|
{
|
||||||
len = 0;
|
len = 0;
|
||||||
if (STRNCMP(s, curwin->w_p_fmr, foldstartmarkerlen) == 0)
|
if (STRNCMP(s, curwin->w_p_fmr, foldstartmarkerlen) == 0)
|
||||||
{
|
|
||||||
len = foldstartmarkerlen;
|
len = foldstartmarkerlen;
|
||||||
if (VIM_ISDIGIT(s[len]))
|
|
||||||
++len;
|
|
||||||
}
|
|
||||||
else if (STRNCMP(s, foldendmarker, foldendmarkerlen) == 0)
|
else if (STRNCMP(s, foldendmarker, foldendmarkerlen) == 0)
|
||||||
{
|
|
||||||
len = foldendmarkerlen;
|
len = foldendmarkerlen;
|
||||||
|
if (len > 0)
|
||||||
|
{
|
||||||
if (VIM_ISDIGIT(s[len]))
|
if (VIM_ISDIGIT(s[len]))
|
||||||
++len;
|
++len;
|
||||||
|
|
||||||
|
/* May remove 'commentstring' start. Useful when it's a double
|
||||||
|
* quote and we already removed a double quote. */
|
||||||
|
for (p = s; p > str && vim_iswhite(p[-1]); --p)
|
||||||
|
;
|
||||||
|
if (p >= str + cms_slen
|
||||||
|
&& STRNCMP(p - cms_slen, cms_start, cms_slen) == 0)
|
||||||
|
{
|
||||||
|
len += (s - p) + cms_slen;
|
||||||
|
s = p - cms_slen;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (cms_end != NULL)
|
else if (cms_end != NULL)
|
||||||
{
|
{
|
||||||
if (!did1 && STRNCMP(s, cms_start, cms_slen) == 0)
|
if (!did1 && cms_slen > 0 && STRNCMP(s, cms_start, cms_slen) == 0)
|
||||||
{
|
{
|
||||||
len = cms_slen;
|
len = cms_slen;
|
||||||
did1 = TRUE;
|
did1 = TRUE;
|
||||||
}
|
}
|
||||||
else if (!did2 && STRNCMP(s, cms_end, cms_elen) == 0)
|
else if (!did2 && cms_elen > 0
|
||||||
|
&& STRNCMP(s, cms_end, cms_elen) == 0)
|
||||||
{
|
{
|
||||||
len = cms_elen;
|
len = cms_elen;
|
||||||
did2 = TRUE;
|
did2 = TRUE;
|
||||||
|
@ -487,6 +487,57 @@ gui_mch_destroy_scrollbar(scrollbar_T *sb)//{{{
|
|||||||
* Implementation of the file selector related stuff
|
* Implementation of the file selector related stuff
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Convert the Vim-style filter specification 's' to the KDE-style
|
||||||
|
* filter specification.
|
||||||
|
* Vim-style: {label}\t{pattern1};{pattern2}\n
|
||||||
|
* KDE-style: {pattern1} {pattern2}|{label}\n
|
||||||
|
*
|
||||||
|
* The newly constructed filter is returned in allocated memory and
|
||||||
|
* must be freed by the calling program.
|
||||||
|
*/
|
||||||
|
static char *
|
||||||
|
convert_filter(char_u *s)
|
||||||
|
{
|
||||||
|
char *res;
|
||||||
|
unsigned i;
|
||||||
|
unsigned pattern_len;
|
||||||
|
char *filter_label;
|
||||||
|
char *filter_pattern;
|
||||||
|
|
||||||
|
// The conversion generates a string of equal length to the original
|
||||||
|
// pattern, so allocate enough memory to hold the original string.
|
||||||
|
res = new char[STRLEN(s) + 1];
|
||||||
|
s = vim_strsave(s);
|
||||||
|
if (res != NULL && s != NULL)
|
||||||
|
{
|
||||||
|
// Make sure the first byte is a NUL so that strcat()
|
||||||
|
// will append at the beginning of the string.
|
||||||
|
res[0] = '\0';
|
||||||
|
filter_label = strtok((char *) s, "\t");
|
||||||
|
while (filter_label != NULL)
|
||||||
|
{
|
||||||
|
filter_pattern = strtok( 0L, "\n");
|
||||||
|
if (filter_pattern != NULL)
|
||||||
|
{
|
||||||
|
pattern_len = (unsigned) STRLEN(filter_pattern);
|
||||||
|
for (i = 0; i < pattern_len; ++i)
|
||||||
|
if (filter_pattern[i] == ';')
|
||||||
|
filter_pattern[i] = ' ';
|
||||||
|
|
||||||
|
strcat(res, filter_pattern);
|
||||||
|
strcat(res, "|");
|
||||||
|
strcat(res, filter_label);
|
||||||
|
strcat(res, "\n");
|
||||||
|
}
|
||||||
|
filter_label = strtok(0L, "\t");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (s)
|
||||||
|
vim_free(s);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Put up a file requester.
|
* Put up a file requester.
|
||||||
* Returns the selected name in allocated memory, or NULL for Cancel.
|
* Returns the selected name in allocated memory, or NULL for Cancel.
|
||||||
@ -508,14 +559,7 @@ gui_mch_browse(int saving,//{{{
|
|||||||
{
|
{
|
||||||
char *filt_glob;
|
char *filt_glob;
|
||||||
|
|
||||||
if (filter != (char_u *)0x0)
|
filt_glob = convert_filter(filter);
|
||||||
{
|
|
||||||
filter = vim_strsave(filter);
|
|
||||||
strtok((char *)filter, "(");
|
|
||||||
filt_glob = strtok(0L, ")");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
filt_glob = (char *)filter;
|
|
||||||
|
|
||||||
gui_mch_mousehide(FALSE);
|
gui_mch_mousehide(FALSE);
|
||||||
|
|
||||||
@ -526,8 +570,8 @@ gui_mch_browse(int saving,//{{{
|
|||||||
else
|
else
|
||||||
s = KFileDialog::getSaveFileName();
|
s = KFileDialog::getSaveFileName();
|
||||||
|
|
||||||
if (filter)
|
if (filt_glob)
|
||||||
vim_free(filter);
|
delete filt_glob;
|
||||||
|
|
||||||
if (s.isNull())
|
if (s.isNull())
|
||||||
return NULL;
|
return NULL;
|
||||||
|
26
src/ops.c
26
src/ops.c
@ -5958,6 +5958,9 @@ cursor_pos_info()
|
|||||||
if (VIsual_active
|
if (VIsual_active
|
||||||
&& lnum >= min_pos.lnum && lnum <= max_pos.lnum)
|
&& lnum >= min_pos.lnum && lnum <= max_pos.lnum)
|
||||||
{
|
{
|
||||||
|
char_u *s = NULL;
|
||||||
|
long len = 0L;
|
||||||
|
|
||||||
switch (VIsual_mode)
|
switch (VIsual_mode)
|
||||||
{
|
{
|
||||||
case Ctrl_V:
|
case Ctrl_V:
|
||||||
@ -5968,12 +5971,12 @@ cursor_pos_info()
|
|||||||
# ifdef FEAT_VIRTUALEDIT
|
# ifdef FEAT_VIRTUALEDIT
|
||||||
virtual_op = MAYBE;
|
virtual_op = MAYBE;
|
||||||
# endif
|
# endif
|
||||||
char_count_cursor += line_count_info(bd.textstart,
|
s = bd.textstart;
|
||||||
&word_count_cursor, (long)bd.textlen, eol_size);
|
len = (long)bd.textlen;
|
||||||
break;
|
break;
|
||||||
case 'V':
|
case 'V':
|
||||||
char_count_cursor += line_count_info(ml_get(lnum),
|
s = ml_get(lnum);
|
||||||
&word_count_cursor, (long)MAXCOL, eol_size);
|
len = MAXCOL;
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
{
|
{
|
||||||
@ -5982,12 +5985,21 @@ cursor_pos_info()
|
|||||||
colnr_T end_col = (lnum == max_pos.lnum)
|
colnr_T end_col = (lnum == max_pos.lnum)
|
||||||
? max_pos.col - start_col + 1 : MAXCOL;
|
? max_pos.col - start_col + 1 : MAXCOL;
|
||||||
|
|
||||||
char_count_cursor +=
|
s = ml_get(lnum) + start_col;
|
||||||
line_count_info(ml_get(lnum) + start_col,
|
len = end_col;
|
||||||
&word_count_cursor, (long)end_col, eol_size);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (s != NULL)
|
||||||
|
{
|
||||||
|
char_count_cursor += line_count_info(s,
|
||||||
|
&word_count_cursor, len, eol_size);
|
||||||
|
if (lnum == curbuf->b_ml.ml_line_count
|
||||||
|
&& !curbuf->b_p_eol
|
||||||
|
&& curbuf->b_p_bin
|
||||||
|
&& STRLEN(s) < len)
|
||||||
|
char_count_cursor -= eol_size;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
@ -3,6 +3,7 @@ void gui_x11_create_widgets __ARGS((void));
|
|||||||
void gui_x11_destroy_widgets __ARGS((void));
|
void gui_x11_destroy_widgets __ARGS((void));
|
||||||
void gui_mch_set_text_area_pos __ARGS((int x, int y, int w, int h));
|
void gui_mch_set_text_area_pos __ARGS((int x, int y, int w, int h));
|
||||||
void gui_x11_set_back_color __ARGS((void));
|
void gui_x11_set_back_color __ARGS((void));
|
||||||
|
void manage_centered __ARGS((Widget dialog_child));
|
||||||
XmFontList gui_motif_create_fontlist __ARGS((XFontStruct *font));
|
XmFontList gui_motif_create_fontlist __ARGS((XFontStruct *font));
|
||||||
XmFontList gui_motif_fontset2fontlist __ARGS((XFontSet *fontset));
|
XmFontList gui_motif_fontset2fontlist __ARGS((XFontSet *fontset));
|
||||||
void gui_mch_enable_menu __ARGS((int flag));
|
void gui_mch_enable_menu __ARGS((int flag));
|
||||||
@ -34,6 +35,8 @@ void gui_mch_set_footer __ARGS((char_u *s));
|
|||||||
void gui_mch_show_toolbar __ARGS((int showit));
|
void gui_mch_show_toolbar __ARGS((int showit));
|
||||||
int gui_mch_compute_toolbar_height __ARGS((void));
|
int gui_mch_compute_toolbar_height __ARGS((void));
|
||||||
void gui_mch_get_toolbar_colors __ARGS((Pixel *bgp, Pixel *fgp, Pixel *bsp, Pixel *tsp, Pixel *hsp));
|
void gui_mch_get_toolbar_colors __ARGS((Pixel *bgp, Pixel *fgp, Pixel *bsp, Pixel *tsp, Pixel *hsp));
|
||||||
|
void gui_motif_menu_fontlist __ARGS((Widget id));
|
||||||
void gui_mch_find_dialog __ARGS((exarg_T *eap));
|
void gui_mch_find_dialog __ARGS((exarg_T *eap));
|
||||||
void gui_mch_replace_dialog __ARGS((exarg_T *eap));
|
void gui_mch_replace_dialog __ARGS((exarg_T *eap));
|
||||||
|
void gui_motif_synch_fonts __ARGS((void));
|
||||||
/* vim: set ft=c : */
|
/* vim: set ft=c : */
|
||||||
|
11
src/search.c
11
src/search.c
@ -2367,6 +2367,7 @@ findsent(dir, count)
|
|||||||
int startlnum;
|
int startlnum;
|
||||||
int noskip = FALSE; /* do not skip blanks */
|
int noskip = FALSE; /* do not skip blanks */
|
||||||
int cpo_J;
|
int cpo_J;
|
||||||
|
int found_dot;
|
||||||
|
|
||||||
pos = curwin->w_cursor;
|
pos = curwin->w_cursor;
|
||||||
if (dir == FORWARD)
|
if (dir == FORWARD)
|
||||||
@ -2404,9 +2405,17 @@ findsent(dir, count)
|
|||||||
decl(&pos);
|
decl(&pos);
|
||||||
|
|
||||||
/* go back to the previous non-blank char */
|
/* go back to the previous non-blank char */
|
||||||
|
found_dot = FALSE;
|
||||||
while ((c = gchar_pos(&pos)) == ' ' || c == '\t' ||
|
while ((c = gchar_pos(&pos)) == ' ' || c == '\t' ||
|
||||||
(dir == BACKWARD && vim_strchr((char_u *)".!?)]\"'", c) != NULL))
|
(dir == BACKWARD && vim_strchr((char_u *)".!?)]\"'", c) != NULL))
|
||||||
{
|
{
|
||||||
|
if (vim_strchr((char_u *)".!?", c) != NULL)
|
||||||
|
{
|
||||||
|
/* Only skip over a '.', '!' and '?' once. */
|
||||||
|
if (found_dot)
|
||||||
|
break;
|
||||||
|
found_dot = TRUE;
|
||||||
|
}
|
||||||
if (decl(&pos) == -1)
|
if (decl(&pos) == -1)
|
||||||
break;
|
break;
|
||||||
/* when going forward: Stop in front of empty line */
|
/* when going forward: Stop in front of empty line */
|
||||||
@ -3315,7 +3324,7 @@ extend:
|
|||||||
if (start_blank)
|
if (start_blank)
|
||||||
--ncount;
|
--ncount;
|
||||||
}
|
}
|
||||||
if (ncount)
|
if (ncount > 0)
|
||||||
findsent_forward(ncount, TRUE);
|
findsent_forward(ncount, TRUE);
|
||||||
else
|
else
|
||||||
decl(&curwin->w_cursor);
|
decl(&curwin->w_cursor);
|
||||||
|
Reference in New Issue
Block a user