Commits

Anonymous committed e474bae

updated for version 7.0027

Comments (0)

Files changed (9)

 		src/gui_kde_x11.cc \
 		src/kvim_iface.h \
 		src/gui_motif.c \
+		src/gui_xmdlg.c \
 		src/gui_x11.c \
 		src/hangulin.c \
 		src/if_xcmdsrv.c \
 		src/proto/gui_kde.pro \
 		src/proto/gui_kde_x11.pro \
 		src/proto/gui_motif.pro \
+		src/proto/gui_xmdlg.pro \
 		src/proto/gui_x11.pro \
 		src/proto/hangulin.pro \
 		src/proto/if_xcmdsrv.pro \

runtime/filetype.vim

 " Vim support file to detect file types
 "
 " 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
 if exists("did_load_filetypes")
 au BufNewFile,BufRead *.bib			setf bib
 
 " BIND configuration
-au BufNewFile,BufRead named.conf		setf named
+au BufNewFile,BufRead named.conf,rndc.conf	setf named
 
 " BIND zone
 au BufNewFile,BufRead named.root		setf bindzone
 au BufNewFile,BufRead *vimrc*			setf vim
 
 " Subversion commit file
-au BufNewFile,BufRead svn-commit.*.tmp		setf svn
+au BufNewFile,BufRead svn-commit*.tmp		setf svn
 
 " X resources file
 au BufNewFile,BufRead Xresources*,*/app-defaults/*,*/Xresources/* setf xdefaults

runtime/syntax/spec.vim

 " Language:    SPEC: Build/install scripts for Linux RPM packages
 " Maintainer:  Donovan Rebbechi elflord@pegasus.rutgers.edu
 " 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 6.x: Quit when a syntax file was already loaded
 "   Scripts, Files and Changelog
 
 "One line macros - valid in all ScriptAreas
-"tip: remember do include new itens 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
+"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\|include\)\>' end='$' contains=specCommandOpts,specMacroIdentifier
 syn region specSectionMacroBracketArea oneline matchgroup=specSectionMacro start='^%{\(configure\|GNUconfigure\|find_lang\|makeinstall\)}' end='$' contains=specCommandOpts,specMacroIdentifier
 
 "%% Files Section %%
 }
 #endif
 
-#if !defined(LC_MESSAGES) \
-    && (((defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
-		&& (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE))) \
-	    || defined(FEAT_EVAL))
+/* Complicated #if; matches with where get_mess_env() is used below. */
+#if (defined(FEAT_EVAL) && !((defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
+	    && defined(LC_MESSAGES))) \
+	|| ((defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
+		&& (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) \
+		&& !defined(LC_MESSAGES))
 static char_u *get_mess_env __ARGS((void));
 
 /*
     char_u	*cms_end;	/* last part of the comment or NULL */
     int		cms_elen = 0;	/* length of cms_end */
     char_u	*s;
+    char_u	*p;
     int		len;
     int		did1 = FALSE;
     int		did2 = FALSE;
     {
 	len = 0;
 	if (STRNCMP(s, curwin->w_p_fmr, foldstartmarkerlen) == 0)
+	    len = foldstartmarkerlen;
+	else if (STRNCMP(s, foldendmarker, foldendmarkerlen) == 0)
+	    len = foldendmarkerlen;
+	if (len > 0)
 	{
-	    len = foldstartmarkerlen;
 	    if (VIM_ISDIGIT(s[len]))
 		++len;
-	}
-	else if (STRNCMP(s, foldendmarker, foldendmarkerlen) == 0)
-	{
-	    len = foldendmarkerlen;
-	    if (VIM_ISDIGIT(s[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)
 	{
-	    if (!did1 && STRNCMP(s, cms_start, cms_slen) == 0)
+	    if (!did1 && cms_slen > 0 && STRNCMP(s, cms_start, cms_slen) == 0)
 	    {
 		len = cms_slen;
 		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;
 		did2 = TRUE;
  */
 
 /*
+ * 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.
  * Returns the selected name in allocated memory, or NULL for Cancel.
  * saving,			select file to write
 {
     char *filt_glob;
 
-    if (filter != (char_u *)0x0)
-    {
-	filter = vim_strsave(filter);
-	strtok((char *)filter, "(");
-	filt_glob = strtok(0L, ")");
-    }
-    else
-	filt_glob = (char *)filter;
+    filt_glob = convert_filter(filter);
 
     gui_mch_mousehide(FALSE);
 
     else
 	s = KFileDialog::getSaveFileName();
 
-    if (filter)
-	vim_free(filter);
+    if (filt_glob)
+	delete filt_glob;
 
     if (s.isNull())
 	return NULL;
 	    if (VIsual_active
 		    && lnum >= min_pos.lnum && lnum <= max_pos.lnum)
 	    {
+		char_u	    *s = NULL;
+		long	    len = 0L;
+
 		switch (VIsual_mode)
 		{
 		    case Ctrl_V:
 # ifdef FEAT_VIRTUALEDIT
 			virtual_op = MAYBE;
 # endif
-			char_count_cursor += line_count_info(bd.textstart,
-				&word_count_cursor, (long)bd.textlen, eol_size);
+			s = bd.textstart;
+			len = (long)bd.textlen;
 			break;
 		    case 'V':
-			char_count_cursor += line_count_info(ml_get(lnum),
-				&word_count_cursor, (long)MAXCOL, eol_size);
+			s = ml_get(lnum);
+			len = MAXCOL;
 			break;
 		    case 'v':
 			{
 			    colnr_T end_col = (lnum == max_pos.lnum)
 				      ? max_pos.col - start_col + 1 : MAXCOL;
 
-			    char_count_cursor +=
-				line_count_info(ml_get(lnum) + start_col,
-				 &word_count_cursor, (long)end_col, eol_size);
+			    s = ml_get(lnum) + start_col;
+			    len = end_col;
 			}
 			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
 #endif

src/proto/gui_motif.pro

 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_x11_set_back_color __ARGS((void));
+void manage_centered __ARGS((Widget dialog_child));
 XmFontList gui_motif_create_fontlist __ARGS((XFontStruct *font));
 XmFontList gui_motif_fontset2fontlist __ARGS((XFontSet *fontset));
 void gui_mch_enable_menu __ARGS((int flag));
 void gui_mch_show_toolbar __ARGS((int showit));
 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_motif_menu_fontlist __ARGS((Widget id));
 void gui_mch_find_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 : */
     int		startlnum;
     int		noskip = FALSE;	    /* do not skip blanks */
     int		cpo_J;
+    int		found_dot;
 
     pos = curwin->w_cursor;
     if (dir == FORWARD)
 	    decl(&pos);
 
 	/* go back to the previous non-blank char */
+	found_dot = FALSE;
 	while ((c = gchar_pos(&pos)) == ' ' || c == '\t' ||
 	     (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)
 		break;
 	    /* when going forward: Stop in front of empty line */
 	if (start_blank)
 	    --ncount;
     }
-    if (ncount)
+    if (ncount > 0)
 	findsent_forward(ncount, TRUE);
     else
 	decl(&curwin->w_cursor);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.