r788 - in /trunk/packages/vim: debian/ patches/ upstream/patches/
jamessan at users.alioth.debian.org
jamessan at users.alioth.debian.org
Tue Oct 10 17:26:15 UTC 2006
Author: jamessan
Date: Tue Oct 10 17:26:14 2006
New Revision: 788
URL: http://svn.debian.org/wsvn/pkg-vim/?sc=1&rev=788
Log:
Add upstream patches 124 - 130. Remove gui_gtk.c-abs_path.diff since it's replaced by upstream patch 129.
Added:
trunk/packages/vim/upstream/patches/7.0.124
trunk/packages/vim/upstream/patches/7.0.125
trunk/packages/vim/upstream/patches/7.0.126
trunk/packages/vim/upstream/patches/7.0.127
trunk/packages/vim/upstream/patches/7.0.128
trunk/packages/vim/upstream/patches/7.0.129
trunk/packages/vim/upstream/patches/7.0.130
Removed:
trunk/packages/vim/patches/gui_gtk.c-abs_path.diff
Modified:
trunk/packages/vim/debian/README
trunk/packages/vim/debian/changelog
trunk/packages/vim/patches/series
Modified: trunk/packages/vim/debian/README
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/debian/README?rev=788&op=diff
==============================================================================
--- trunk/packages/vim/debian/README (original)
+++ trunk/packages/vim/debian/README Tue Oct 10 17:26:14 2006
@@ -148,3 +148,10 @@
1549 7.0.121 GUI: dragging last status line doesn't work with text tabline
2865 7.0.122 only half of double-wide bold character may be drawn
4200 7.0.123 SCO Openserver: configure selects the wrong terminal library
+ 2376 7.0.124 window-local variables from getwinvar() are for current window
+ 2335 7.0.125 '< and '> marks were set before Visual mode finishes
+ 2112 7.0.126 undo could be wrong when 'formatexpr' uses setline()
+ 2605 7.0.127 crash when swap file has invalid timestamp
+ 2246 7.0.128 GUI: display not updated when cancelling exit dialog
+ 2884 7.0.129 GTK GUI: avoid GTK bug concerning directory for file dialog
+ 5509 7.0.130 (extra) MS-DOS, MS-Windows: may get stuck using a device name
Modified: trunk/packages/vim/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/debian/changelog?rev=788&op=diff
==============================================================================
--- trunk/packages/vim/debian/changelog (original)
+++ trunk/packages/vim/debian/changelog Tue Oct 10 17:26:14 2006
@@ -1,12 +1,13 @@
-vim (1:7.0-123+1) UNRELEASED; urgency=low
+vim (1:7.0-130+1) UNRELEASED; urgency=low
[ Debian Vim Maintainers ]
- * New upstream patches (123 - XXX), see README.gz for details.
+ * New upstream patches (123 - 130), see README.gz for details.
[ James Vega ]
* Bump vim-common's priority to important to match the override.
-
- -- Stefano Zacchiroli <zack at debian.org> Tue, 10 Oct 2006 12:46:55 +0200
+ * Remove patch gui_gtk.c-abc_path.diff, merged upstream.
+
+ -- James Vega <jamessan at debian.org> Tue, 10 Oct 2006 13:23:53 -0400
vim (1:7.0-122+1) unstable; urgency=medium
Modified: trunk/packages/vim/patches/series
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/patches/series?rev=788&op=diff
==============================================================================
--- trunk/packages/vim/patches/series (original)
+++ trunk/packages/vim/patches/series Tue Oct 10 17:26:14 2006
@@ -13,5 +13,4 @@
ruby.vim-ftplugin_ri.diff -p0
python.vim-ftplugin_pydoc.diff -p0
zsh.vim-nested_quotes.diff -p0
-gui_gtk.c-abs_path.diff -p0
mp.vim-cmd_check.diff -p0
Added: trunk/packages/vim/upstream/patches/7.0.124
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.0.124?rev=788&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.0.124 (added)
+++ trunk/packages/vim/upstream/patches/7.0.124 Tue Oct 10 17:26:14 2006
@@ -1,0 +1,87 @@
+To: vim-dev at vim.org
+Subject: Patch 7.0.124
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.0.124
+Problem: getwinvar() obtains a dictionary with window-local variables, but
+ it's always for the current window.
+Solution: Get the variables of the specified window. (Geoff Reedy)
+Files: src/eval.c
+
+
+*** ../vim-7.0.123/src/eval.c Tue Oct 3 14:43:31 2006
+--- src/eval.c Fri Oct 6 21:08:57 2006
+***************
+*** 10432,10451 ****
+
+ if (win != NULL && varname != NULL)
+ {
+! if (*varname == '&') /* window-local-option */
+! {
+! /* Set curwin to be our win, temporarily. Also set curbuf, so
+! * that we can get buffer-local options. */
+! oldcurwin = curwin;
+! curwin = win;
+! curbuf = win->w_buffer;
+
+ get_option_tv(&varname, rettv, 1);
+-
+- /* restore previous notion of curwin */
+- curwin = oldcurwin;
+- curbuf = curwin->w_buffer;
+- }
+ else
+ {
+ if (*varname == NUL)
+--- 10432,10445 ----
+
+ if (win != NULL && varname != NULL)
+ {
+! /* Set curwin to be our win, temporarily. Also set curbuf, so
+! * that we can get buffer-local options. */
+! oldcurwin = curwin;
+! curwin = win;
+! curbuf = win->w_buffer;
+
++ if (*varname == '&') /* window-local-option */
+ get_option_tv(&varname, rettv, 1);
+ else
+ {
+ if (*varname == NUL)
+***************
+*** 10458,10463 ****
+--- 10452,10461 ----
+ if (v != NULL)
+ copy_tv(&v->di_tv, rettv);
+ }
++
++ /* restore previous notion of curwin */
++ curwin = oldcurwin;
++ curbuf = curwin->w_buffer;
+ }
+
+ --emsg_off;
+*** ../vim-7.0.123/src/version.c Tue Oct 10 11:41:44 2006
+--- src/version.c Tue Oct 10 12:53:15 2006
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 124,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+14. Put mosquito netting around your work area. Play a tape of jungle
+ sounds all day.
+
+ /// 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 ///
Added: trunk/packages/vim/upstream/patches/7.0.125
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.0.125?rev=788&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.0.125 (added)
+++ trunk/packages/vim/upstream/patches/7.0.125 Tue Oct 10 17:26:14 2006
@@ -1,0 +1,72 @@
+To: vim-dev at vim.org
+Subject: Patch 7.0.125
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.0.125
+Problem: When "autoselect" is in the 'clipboard' option then the '< and '>
+ marks are set while Visual mode is still active.
+Solution: Don't set the '< and '> marks when yanking the selected area for
+ the clipboard.
+Files: src/normal.c
+
+
+*** ../vim-7.0.124/src/normal.c Tue Aug 29 17:28:56 2006
+--- src/normal.c Sat Oct 7 14:11:26 2006
+***************
+*** 1477,1490 ****
+ }
+ else if (VIsual_active)
+ {
+! /* Save the current VIsual area for '< and '> marks, and "gv" */
+! curbuf->b_visual.vi_start = VIsual;
+! curbuf->b_visual.vi_end = curwin->w_cursor;
+! curbuf->b_visual.vi_mode = VIsual_mode;
+! curbuf->b_visual.vi_curswant = curwin->w_curswant;
+ # ifdef FEAT_EVAL
+! curbuf->b_visual_mode_eval = VIsual_mode;
+ # endif
+
+ /* In Select mode, a linewise selection is operated upon like a
+ * characterwise selection. */
+--- 1477,1493 ----
+ }
+ else if (VIsual_active)
+ {
+! if (!gui_yank)
+! {
+! /* Save the current VIsual area for '< and '> marks, and "gv" */
+! curbuf->b_visual.vi_start = VIsual;
+! curbuf->b_visual.vi_end = curwin->w_cursor;
+! curbuf->b_visual.vi_mode = VIsual_mode;
+! curbuf->b_visual.vi_curswant = curwin->w_curswant;
+ # ifdef FEAT_EVAL
+! curbuf->b_visual_mode_eval = VIsual_mode;
+ # endif
++ }
+
+ /* In Select mode, a linewise selection is operated upon like a
+ * characterwise selection. */
+*** ../vim-7.0.124/src/version.c Tue Oct 10 12:56:09 2006
+--- src/version.c Tue Oct 10 13:25:27 2006
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 125,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+15. Five days in advance, tell your friends you can't attend their
+ party because you're not in the mood.
+
+ /// 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 ///
Added: trunk/packages/vim/upstream/patches/7.0.126
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.0.126?rev=788&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.0.126 (added)
+++ trunk/packages/vim/upstream/patches/7.0.126 Tue Oct 10 17:26:14 2006
@@ -1,0 +1,63 @@
+To: vim-dev at vim.org
+Subject: Patch 7.0.126
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.0.126
+Problem: When 'formatexpr' uses setline() and later internal formatting is
+ used undo information is not correct. (Jiri Cerny, Benji Fisher)
+Solution: Set ins_need_undo after using 'formatexpr'.
+Files: src/edit.c
+
+
+*** ../vim-7.0.125/src/edit.c Fri Oct 6 20:39:58 2006
+--- src/edit.c Tue Oct 10 12:46:04 2006
+***************
+*** 5333,5340 ****
+ /* Format with 'formatexpr' when it's set. Use internal formatting
+ * when 'formatexpr' isn't set or it returns non-zero. */
+ #if defined(FEAT_EVAL)
+! if (*curbuf->b_p_fex == NUL
+! || fex_format(curwin->w_cursor.lnum, 1L, c) != 0)
+ #endif
+ internal_format(textwidth, second_indent, flags, c == NUL);
+ }
+--- 5333,5348 ----
+ /* Format with 'formatexpr' when it's set. Use internal formatting
+ * when 'formatexpr' isn't set or it returns non-zero. */
+ #if defined(FEAT_EVAL)
+! int do_internal = TRUE;
+!
+! if (*curbuf->b_p_fex != NUL)
+! {
+! do_internal = (fex_format(curwin->w_cursor.lnum, 1L, c) != 0);
+! /* It may be required to save for undo again, e.g. when setline()
+! * was called. */
+! ins_need_undo = TRUE;
+! }
+! if (do_internal)
+ #endif
+ internal_format(textwidth, second_indent, flags, c == NUL);
+ }
+*** ../vim-7.0.125/src/version.c Tue Oct 10 13:27:30 2006
+--- src/version.c Tue Oct 10 15:47:20 2006
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 126,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+16. Have your coworkers address you by your wrestling name, Rock Hard Kim.
+
+ /// 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 ///
Added: trunk/packages/vim/upstream/patches/7.0.127
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.0.127?rev=788&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.0.127 (added)
+++ trunk/packages/vim/upstream/patches/7.0.127 Tue Oct 10 17:26:14 2006
@@ -1,0 +1,99 @@
+To: vim-dev at vim.org
+Subject: Patch 7.0.127
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.0.127
+Problem: Crash when swap files has invalid timestamp.
+Solution: Check return value of ctime() for being NULL.
+Files: src/memline.c
+
+
+*** ../vim-7.0.126/src/memline.c Tue Aug 29 17:28:56 2006
+--- src/memline.c Tue Oct 10 16:19:56 2006
+***************
+*** 1633,1638 ****
+--- 1633,1639 ----
+ int fd;
+ struct block0 b0;
+ time_t x = (time_t)0;
++ char *p;
+ #ifdef UNIX
+ char_u uname[B0_UNAME_SIZE];
+ #endif
+***************
+*** 1652,1659 ****
+ #endif
+ MSG_PUTS(_(" dated: "));
+ x = st.st_mtime; /* Manx C can't do &st.st_mtime */
+! MSG_PUTS(ctime(&x)); /* includes '\n' */
+!
+ }
+
+ /*
+--- 1653,1663 ----
+ #endif
+ MSG_PUTS(_(" dated: "));
+ x = st.st_mtime; /* Manx C can't do &st.st_mtime */
+! p = ctime(&x); /* includes '\n' */
+! if (p == NULL)
+! MSG_PUTS("(invalid)\n");
+! else
+! MSG_PUTS(p);
+ }
+
+ /*
+***************
+*** 3652,3657 ****
+--- 3656,3662 ----
+ {
+ struct stat st;
+ time_t x, sx;
++ char *p;
+
+ ++no_wait_return;
+ (void)EMSG(_("E325: ATTENTION"));
+***************
+*** 3666,3672 ****
+ {
+ MSG_PUTS(_(" dated: "));
+ x = st.st_mtime; /* Manx C can't do &st.st_mtime */
+! MSG_PUTS(ctime(&x));
+ if (sx != 0 && x > sx)
+ MSG_PUTS(_(" NEWER than swap file!\n"));
+ }
+--- 3671,3681 ----
+ {
+ MSG_PUTS(_(" dated: "));
+ x = st.st_mtime; /* Manx C can't do &st.st_mtime */
+! p = ctime(&x); /* includes '\n' */
+! if (p == NULL)
+! MSG_PUTS("(invalid)\n");
+! else
+! MSG_PUTS(p);
+ if (sx != 0 && x > sx)
+ MSG_PUTS(_(" NEWER than swap file!\n"));
+ }
+*** ../vim-7.0.126/src/version.c Tue Oct 10 15:49:41 2006
+--- src/version.c Tue Oct 10 16:18:51 2006
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 127,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+17. When the money comes out the ATM, scream "I won!, I won! 3rd
+ time this week!!!!!"
+
+ /// 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 ///
Added: trunk/packages/vim/upstream/patches/7.0.128
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.0.128?rev=788&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.0.128 (added)
+++ trunk/packages/vim/upstream/patches/7.0.128 Tue Oct 10 17:26:14 2006
@@ -1,0 +1,76 @@
+To: vim-dev at vim.org
+Subject: Patch 7.0.128
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.0.128
+Problem: GUI: when closing gvim is cancelled because there is a changed
+ buffer the screen isn't updated to show the changed buffer in the
+ current window. (Krzysztof Kacprzak)
+Solution: Redraw when closing gvim is cancelled.
+Files: src/gui.c
+
+
+*** ../vim-7.0.127/src/gui.c Sun Oct 8 13:56:53 2006
+--- src/gui.c Tue Oct 10 13:45:13 2006
+***************
+*** 637,642 ****
+--- 637,643 ----
+
+ #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_MSWIN) \
+ || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC) || defined(PROTO)
++ # define NEED_GUI_UPDATE_SCREEN 1
+ /*
+ * Called when the GUI shell is closed by the user. If there are no changed
+ * files Vim exits, otherwise there will be a dialog to ask the user what to
+***************
+*** 665,672 ****
+
+ exiting = FALSE;
+ cmdmod = save_cmdmod;
+! setcursor(); /* position cursor */
+! out_flush();
+ }
+ #endif
+
+--- 666,672 ----
+
+ exiting = FALSE;
+ cmdmod = save_cmdmod;
+! gui_update_screen(); /* redraw, window may show changed buffer */
+ }
+ #endif
+
+***************
+*** 4823,4828 ****
+--- 4823,4829 ----
+ #endif
+
+ #if defined(FIND_REPLACE_DIALOG) || defined(FEAT_SUN_WORKSHOP) \
++ || defined(NEED_GUI_UPDATE_SCREEN) \
+ || defined(PROTO)
+ /*
+ * Update the current window and the screen.
+*** ../vim-7.0.127/src/version.c Tue Oct 10 16:20:51 2006
+--- src/version.c Tue Oct 10 17:35:42 2006
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 128,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+18. When leaving the zoo, start running towards the parking lot,
+ yelling "run for your lives, they're loose!!"
+
+ /// 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 ///
Added: trunk/packages/vim/upstream/patches/7.0.129
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.0.129?rev=788&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.0.129 (added)
+++ trunk/packages/vim/upstream/patches/7.0.129 Tue Oct 10 17:26:14 2006
@@ -1,0 +1,86 @@
+To: vim-dev at vim.org
+Subject: Patch 7.0.129
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.0.129
+Problem: GTK GUI: the GTK file dialog can't handle a relative path.
+Solution: Make the initial directory a full path before passing it to GTK.
+ (James Vega) Also postpone adding the default file name until
+ after setting the directory.
+Files: src/gui_gtk.c
+
+
+*** ../vim-7.0.128/src/gui_gtk.c Tue Aug 29 17:28:56 2006
+--- src/gui_gtk.c Tue Oct 10 18:16:00 2006
+***************
+*** 1275,1292 ****
+ title = CONVERT_TO_UTF8(title);
+ # endif
+
+! /* Concatenate "initdir" and "dflt". */
+ if (initdir == NULL || *initdir == NUL)
+ mch_dirname(dirbuf, MAXPATHL);
+! else if (STRLEN(initdir) + 2 < MAXPATHL)
+! STRCPY(dirbuf, initdir);
+! else
+ dirbuf[0] = NUL;
+ /* Always need a trailing slash for a directory. */
+ add_pathsep(dirbuf);
+- if (dflt != NULL && *dflt != NUL
+- && STRLEN(dirbuf) + 2 + STRLEN(dflt) < MAXPATHL)
+- STRCAT(dirbuf, dflt);
+
+ /* If our pointer is currently hidden, then we should show it. */
+ gui_mch_mousehide(FALSE);
+--- 1275,1287 ----
+ title = CONVERT_TO_UTF8(title);
+ # endif
+
+! /* GTK has a bug, it only works with an absolute path. */
+ if (initdir == NULL || *initdir == NUL)
+ mch_dirname(dirbuf, MAXPATHL);
+! else if (vim_FullName(initdir, dirbuf, MAXPATHL - 2, FALSE) == FAIL)
+ dirbuf[0] = NUL;
+ /* Always need a trailing slash for a directory. */
+ add_pathsep(dirbuf);
+
+ /* If our pointer is currently hidden, then we should show it. */
+ gui_mch_mousehide(FALSE);
+***************
+*** 1340,1345 ****
+--- 1335,1345 ----
+ }
+ else
+ gtk_window_set_title(GTK_WINDOW(gui.filedlg), (const gchar *)title);
++
++ /* Concatenate "initdir" and "dflt". */
++ if (dflt != NULL && *dflt != NUL
++ && STRLEN(dirbuf) + 2 + STRLEN(dflt) < MAXPATHL)
++ STRCAT(dirbuf, dflt);
+
+ gtk_file_selection_set_filename(GTK_FILE_SELECTION(gui.filedlg),
+ (const gchar *)dirbuf);
+*** ../vim-7.0.128/src/version.c Tue Oct 10 17:36:50 2006
+--- src/version.c Tue Oct 10 18:25:11 2006
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 129,
+ /**/
+
+--
+I'm not familiar with this proof, but I'm aware of a significant
+following of toddlers who believe that peanut butter is the solution
+to all of life's problems... -- Tim Hammerquist
+
+ /// 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 ///
Added: trunk/packages/vim/upstream/patches/7.0.130
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.0.130?rev=788&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.0.130 (added)
+++ trunk/packages/vim/upstream/patches/7.0.130 Tue Oct 10 17:26:14 2006
@@ -1,0 +1,169 @@
+To: vim-dev at vim.org
+Subject: Patch 7.0.130
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.0.130 (extra)
+Problem: Win32: Trying to edit or write devices may cause Vim to get stuck.
+Solution: Add the 'opendevice' option, default off. Disallow
+ reading/writing from/to devices when it's off.
+ Also detect more devices by the full name starting with "\\.\".
+Files: runtime/doc/options.txt, src/fileio.c, src/option.c, src/option.h,
+ src/os_win32.c
+
+
+*** ../vim-7.0.129/runtime/doc/options.txt Sun May 7 17:07:10 2006
+--- runtime/doc/options.txt Tue Oct 10 17:34:48 2006
+***************
+*** 4792,4801 ****
+ completion with CTRL-X CTRL-O. |i_CTRL-X_CTRL-O|
+ See |complete-functions| for an explanation of how the function is
+ invoked and what it should return.
+! This option is usually set by a filetype plugin.
+ |:filetype-plugin-on|
+
+
+ *'operatorfunc'* *'opfunc'*
+ 'operatorfunc' 'opfunc' string (default: empty)
+ global
+--- 4815,4836 ----
+ completion with CTRL-X CTRL-O. |i_CTRL-X_CTRL-O|
+ See |complete-functions| for an explanation of how the function is
+ invoked and what it should return.
+! This option is usually set by a filetype plugin:
+ |:filetype-plugin-on|
+
+
++ *'opendevice* *'odev* *'noopendevice* *'noodev*
++ 'opendevice' 'odev' boolean (default off)
++ global
++ {not in Vi}
++ {only for MS-DOS, MS-Windows and OS/2}
++ Enable reading and writing from devices. This may get Vim stuck on a
++ device that can be opened but doesn't actually do the I/O. Therefore
++ it is off by default.
++ Note that on MS-Windows editing "aux.h", "lpt1.txt" and the like also
++ result in editing a device.
++
++
+ *'operatorfunc'* *'opfunc'*
+ 'operatorfunc' 'opfunc' string (default: empty)
+ global
+*** ../vim-7.0.129/src/fileio.c Thu Sep 14 11:07:08 2006
+--- src/fileio.c Tue Oct 10 18:41:24 2006
+***************
+*** 419,424 ****
+--- 419,438 ----
+ }
+ #endif
+
++ #if defined(MSDOS) || defined(MSWIN) || defined(OS2)
++ /*
++ * MS-Windows allows opening a device, but we will probably get stuck
++ * trying to read it.
++ */
++ if (!p_odev && mch_nodetype(fname) == NODE_WRITABLE)
++ {
++ filemess(curbuf, fname, (char_u *)_("is a device (disabled with 'opendevice' option"), 0);
++ msg_end();
++ msg_scroll = msg_save;
++ return FAIL;
++ }
++ #endif
++
+ /* set default 'fileformat' */
+ if (set_options)
+ {
+***************
+*** 3163,3168 ****
+--- 3177,3192 ----
+ }
+ if (c == NODE_WRITABLE)
+ {
++ # if defined(MSDOS) || defined(MSWIN) || defined(OS2)
++ /* MS-Windows allows opening a device, but we will probably get stuck
++ * trying to write to it. */
++ if (!p_odev)
++ {
++ errnum = (char_u *)"E796: ";
++ errmsg = (char_u *)_("writing to device disabled with 'opendevice' option");
++ goto fail;
++ }
++ # endif
+ device = TRUE;
+ newfile = TRUE;
+ perm = -1;
+*** ../vim-7.0.129/src/option.c Tue Sep 5 16:29:38 2006
+--- src/option.c Tue Oct 10 17:16:00 2006
+***************
+*** 1810,1815 ****
+--- 1810,1823 ----
+ {"open", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)FALSE, (char_u *)0L}},
++ {"opendevice", "odev", P_BOOL|P_VI_DEF,
++ #if defined(MSDOS) || defined(MSWIN) || defined(OS2)
++ (char_u *)&p_odev, PV_NONE,
++ #else
++ (char_u *)NULL, PV_NONE,
++ #endif
++ {(char_u *)FALSE, (char_u *)FALSE}
++ },
+ {"operatorfunc", "opfunc", P_STRING|P_VI_DEF|P_SECURE,
+ (char_u *)&p_opfunc, PV_NONE,
+ {(char_u *)"", (char_u *)0L} },
+*** ../vim-7.0.129/src/option.h Mon Apr 24 21:37:06 2006
+--- src/option.h Tue Oct 10 17:17:09 2006
+***************
+*** 618,623 ****
+--- 618,626 ----
+ #ifdef FEAT_MZSCHEME
+ EXTERN long p_mzq; /* 'mzquantum */
+ #endif
++ #if defined(MSDOS) || defined(MSWIN) || defined(OS2)
++ EXTERN int p_odev; /* 'opendevice' */
++ #endif
+ EXTERN char_u *p_opfunc; /* 'operatorfunc' */
+ EXTERN char_u *p_para; /* 'paragraphs' */
+ EXTERN int p_paste; /* 'paste' */
+*** ../vim-7.0.129/src/os_win32.c Sun Apr 23 00:24:31 2006
+--- src/os_win32.c Tue Oct 10 17:08:23 2006
+***************
+*** 2702,2707 ****
+--- 2702,2713 ----
+ HANDLE hFile;
+ int type;
+
++ /* We can't open a file with a name "\\.\con" or "\\.\prn" and trying to
++ * read from it later will cause Vim to hang. Thus return NODE_WRITABLE
++ * here. */
++ if (STRNCMP(name, "\\\\.\\", 4) == 0)
++ return NODE_WRITABLE;
++
+ hFile = CreateFile(name, /* file name */
+ GENERIC_WRITE, /* access mode */
+ 0, /* share mode */
+*** ../vim-7.0.129/src/version.c Tue Oct 10 18:29:21 2006
+--- src/version.c Tue Oct 10 18:37:12 2006
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 130,
+ /**/
+
+--
+"Space is big. Really big. You just won't believe how vastly hugely mind-
+bogglingly big it is. I mean, you may think it's a long way down the
+road to the chemist, but that's just peanuts to space."
+ -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
+
+ /// 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 pkg-vim-maintainers
mailing list