packages: vim/7.2.268 (NEW), vim/7.2.269 (NEW) - new

adamg adamg at pld-linux.org
Sat Nov 7 15:53:52 CET 2009


Author: adamg                        Date: Sat Nov  7 14:53:52 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- new

---- Files affected:
packages/vim:
   7.2.268 (NONE -> 1.1)  (NEW), 7.2.269 (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/vim/7.2.268
diff -u /dev/null packages/vim/7.2.268:1.1
--- /dev/null	Sat Nov  7 15:53:52 2009
+++ packages/vim/7.2.268	Sat Nov  7 15:53:46 2009
@@ -0,0 +1,80 @@
+To: vim-dev at vim.org
+Subject: Patch 7.2.268
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.2.268
+Problem:    Crash when using Python to set cursor beyond end of line.
+	    (winterTTr)
+Solution:   Check the column to be valid.
+Files:	    src/if_python.c
+
+
+*** ../vim-7.2.267/src/if_python.c	2009-07-09 20:06:30.000000000 +0200
+--- src/if_python.c	2009-10-10 14:49:10.000000000 +0200
+***************
+*** 2058,2063 ****
+--- 2058,2064 ----
+      {
+  	long lnum;
+  	long col;
++ 	long len;
+  
+  	if (!PyArg_Parse(val, "(ll)", &lnum, &col))
+  	    return -1;
+***************
+*** 2072,2081 ****
+  	if (VimErrorCheck())
+  	    return -1;
+  
+! 	/* NO CHECK ON COLUMN - SEEMS NOT TO MATTER */
+  
+  	this->win->w_cursor.lnum = lnum;
+  	this->win->w_cursor.col = col;
+  	update_screen(VALID);
+  
+  	return 0;
+--- 2073,2088 ----
+  	if (VimErrorCheck())
+  	    return -1;
+  
+! 	/* When column is out of range silently correct it. */
+! 	len = STRLEN(ml_get_buf(this->win->w_buffer, lnum, FALSE));
+! 	if (col > len)
+! 	    col = len;
+  
+  	this->win->w_cursor.lnum = lnum;
+  	this->win->w_cursor.col = col;
++ #ifdef FEAT_VIRTUALEDIT
++ 	this->win->w_cursor.coladd = 0;
++ #endif
+  	update_screen(VALID);
+  
+  	return 0;
+*** ../vim-7.2.267/src/version.c	2009-10-07 16:19:52.000000000 +0200
+--- src/version.c	2009-11-03 11:42:08.000000000 +0100
+***************
+*** 678,679 ****
+--- 678,681 ----
+  {   /* Add new patch number below this line */
++ /**/
++     268,
+  /**/
+
+-- 
+VOICE OVER: As the horrendous Black Beast lunged forward, escape for Arthur
+            and his knights seemed hopeless,  when, suddenly ... the animator
+            suffered a fatal heart attack.
+ANIMATOR:   Aaaaagh!
+VOICE OVER: The cartoon peril was no more ... The Quest for Holy Grail could
+            continue.
+                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\        download, build and distribute -- http://www.A-A-P.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

================================================================
Index: packages/vim/7.2.269
diff -u /dev/null packages/vim/7.2.269:1.1
--- /dev/null	Sat Nov  7 15:53:52 2009
+++ packages/vim/7.2.269	Sat Nov  7 15:53:46 2009
@@ -0,0 +1,261 @@
+To: vim-dev at vim.org
+Subject: Patch 7.2.269
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.2.269
+Problem:    Many people struggle to find out why Vim startup is slow.
+Solution:   Add the --startuptime command line flag.
+Files:	    runtime/doc/starting.txt, src/globals.h, src/feature.h,
+	    src/main.c, src/macros.h
+
+
+*** ../vim-7.2.268/runtime/doc/starting.txt	2008-11-09 13:43:25.000000000 +0100
+--- runtime/doc/starting.txt	2009-10-25 11:57:51.000000000 +0100
+***************
+*** 144,149 ****
+--- 144,156 ----
+  			-u NORC			no		    yes
+  			--noplugin		yes		    no
+  
++ --startuptime={fname}					*--startuptime*
++ 		During startup write timing messages to the file {fname}.
++ 		This can be used to find out where time is spent while loading
++ 		your .vimrc and plugins.
++ 		When {fname} already exists new messages are appended.
++ 		{only when compiled with this feature}
++ 
+  							*--literal*
+  --literal	Take file names literally, don't expand wildcards.  Not needed
+  		for Unix, because Vim always takes file names literally (the
+***************
+*** 471,476 ****
+--- 487,493 ----
+  		window title and copy/paste using the X clipboard.  This
+  		avoids a long startup time when running Vim in a terminal
+  		emulator and the connection to the X server is slow.
++ 		See |--startuptime| to find out if affects you.
+  		Only makes a difference on Unix or VMS, when compiled with the
+  		|+X11| feature.  Otherwise it's ignored.
+  		To disable the connection only for specific terminals, see the
+*** ../vim-7.2.268/src/globals.h	2009-07-29 12:09:49.000000000 +0200
+--- src/globals.h	2009-10-10 15:14:31.000000000 +0200
+***************
+*** 1567,1572 ****
+--- 1567,1576 ----
+  /* For undo we need to know the lowest time possible. */
+  EXTERN time_t starttime;
+  
++ #ifdef STARTUPTIME
++ EXTERN FILE *time_fd INIT(= NULL);  /* where to write startup timing */
++ #endif
++ 
+  /*
+   * Some compilers warn for not using a return value, but in some situations we
+   * can't do anything useful with the value.  Assign to this variable to avoid
+*** ../vim-7.2.268/src/feature.h	2008-11-09 13:43:25.000000000 +0100
+--- src/feature.h	2009-10-10 16:16:19.000000000 +0200
+***************
+*** 844,853 ****
+  /* #define DEBUG */
+  
+  /*
+!  * STARTUPTIME		Time the startup process.  Writes a "vimstartup" file
+!  *			with timestamps.
+   */
+! /* #define STARTUPTIME "vimstartup" */
+  
+  /*
+   * MEM_PROFILE		Debugging of memory allocation and freeing.
+--- 844,857 ----
+  /* #define DEBUG */
+  
+  /*
+!  * STARTUPTIME		Time the startup process.  Writes a file with
+!  *			timestamps.
+   */
+! #if defined(FEAT_NORMAL) \
+! 	&& ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \
+! 		|| defined(WIN3264))
+! # define STARTUPTIME 1
+! #endif
+  
+  /*
+   * MEM_PROFILE		Debugging of memory allocation and freeing.
+*** ../vim-7.2.268/src/main.c	2009-05-26 22:58:43.000000000 +0200
+--- src/main.c	2009-10-10 16:18:32.000000000 +0200
+***************
+*** 130,139 ****
+  #endif
+  
+  
+- #ifdef STARTUPTIME
+- static FILE *time_fd = NULL;
+- #endif
+- 
+  /*
+   * Different types of error messages.
+   */
+--- 130,135 ----
+***************
+*** 173,178 ****
+--- 169,177 ----
+      char_u	*fname = NULL;		/* file name from command line */
+      mparm_T	params;			/* various parameters passed between
+  					 * main() and other functions. */
++ #ifdef STARTUPTIME
++     int		i;
++ #endif
+  
+      /*
+       * Do any system-specific initialisations.  These can NOT use IObuff or
+***************
+*** 203,210 ****
+  #endif
+  
+  #ifdef STARTUPTIME
+!     time_fd = mch_fopen(STARTUPTIME, "a");
+!     TIME_MSG("--- VIM STARTING ---");
+  #endif
+      starttime = time(NULL);
+  
+--- 202,216 ----
+  #endif
+  
+  #ifdef STARTUPTIME
+!     for (i = 1; i < argc; ++i)
+!     {
+! 	if (STRNICMP(argv[i], "--startuptime=", 14) == 0)
+! 	{
+! 	    time_fd = mch_fopen(argv[i] + 14, "a");
+! 	    TIME_MSG("--- VIM STARTING ---");
+! 	    break;
+! 	}
+!     }
+  #endif
+      starttime = time(NULL);
+  
+***************
+*** 1150,1155 ****
+--- 1156,1173 ----
+  	    cursor_on();
+  
+  	    do_redraw = FALSE;
++ 
++ #ifdef STARTUPTIME
++ 	    /* Now that we have drawn the first screen all the startup stuff
++ 	     * has been done, close any file for startup messages. */
++ 	    if (time_fd != NULL)
++ 	    {
++ 		TIME_MSG("first screen update");
++ 		TIME_MSG("--- VIM STARTED ---");
++ 		fclose(time_fd);
++ 		time_fd = NULL;
++ 	    }
++ #endif
+  	}
+  #ifdef FEAT_GUI
+  	if (need_mouse_correct)
+***************
+*** 1743,1748 ****
+--- 1761,1770 ----
+  		    /* already processed, skip */
+  		}
+  #endif
++ 		else if (STRNICMP(argv[0] + argv_idx, "startuptime", 11) == 0)
++ 		{
++ 		    /* already processed, skip */
++ 		}
+  		else
+  		{
+  		    if (argv[0][argv_idx])
+***************
+*** 3211,3216 ****
+--- 3233,3252 ----
+  
+  static struct timeval	prev_timeval;
+  
++ # ifdef WIN3264
++ /*
++  * Windows doesn't have gettimeofday(), although it does have struct timeval.
++  */
++     static int
++ gettimeofday(struct timeval *tv, char *dummy)
++ {
++     long t = clock();
++     tv->tv_sec = t / CLOCKS_PER_SEC;
++     tv->tv_usec = (t - tv->tv_sec * CLOCKS_PER_SEC) * 1000000 / CLOCKS_PER_SEC;
++     return 0;
++ }
++ # endif
++ 
+  /*
+   * Save the previous time before doing something that could nest.
+   * set "*tv_rel" to the time elapsed so far.
+***************
+*** 3299,3318 ****
+      }
+  }
+  
+- # ifdef WIN3264
+- /*
+-  * Windows doesn't have gettimeofday(), although it does have struct timeval.
+-  */
+-     int
+- gettimeofday(struct timeval *tv, char *dummy)
+- {
+-     long t = clock();
+-     tv->tv_sec = t / CLOCKS_PER_SEC;
+-     tv->tv_usec = (t - tv->tv_sec * CLOCKS_PER_SEC) * 1000000 / CLOCKS_PER_SEC;
+-     return 0;
+- }
+- # endif
+- 
+  #endif
+  
+  #if defined(FEAT_CLIENTSERVER) || defined(PROTO)
+--- 3335,3340 ----
+*** ../vim-7.2.268/src/macros.h	2009-05-17 13:30:58.000000000 +0200
+--- src/macros.h	2009-10-10 15:19:07.000000000 +0200
+***************
+*** 243,249 ****
+  #endif
+  
+  #ifdef STARTUPTIME
+! # define TIME_MSG(s) time_msg(s, NULL)
+  #else
+  # define TIME_MSG(s)
+  #endif
+--- 243,249 ----
+  #endif
+  
+  #ifdef STARTUPTIME
+! # define TIME_MSG(s) { if (time_fd != NULL) time_msg(s, NULL); }
+  #else
+  # define TIME_MSG(s)
+  #endif
+*** ../vim-7.2.268/src/version.c	2009-11-03 11:43:05.000000000 +0100
+--- src/version.c	2009-11-03 12:06:31.000000000 +0100
+***************
+*** 678,679 ****
+--- 678,681 ----
+  {   /* Add new patch number below this line */
++ /**/
++     269,
+  /**/
+
+-- 
+BEDEVERE: Look!  It's the old man from scene 24 - what's he Doing here?
+ARTHUR:   He is the keeper of the Bridge.  He asks each traveler five
+          questions ...
+GALAHAD:  Three questions.
+                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\        download, build and distribute -- http://www.A-A-P.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
================================================================


More information about the pld-cvs-commit mailing list