To: vim-dev@vim.org
Subject: Patch 6.1a.005 (extra)
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------
Patch 6.1a.005 (extra)
Problem: Win32: ":hardcopy" doesn't work after ":hardcopy!". (Jonathan
Johnston)
Solution: Don't keep the driver context when using ":hardcopy!". (Vince
Negri)
Files: src/os_mswin.c
*** ../vim61a.004/src/os_mswin.c Sun Feb 17 17:16:12 2002
--- src/os_mswin.c Mon Feb 25 10:44:22 2002
***************
*** 1339,1358 ****
}
else if (PrintDlg(&prt_dlg) == 0)
goto init_fail_dlg;
if (prt_dlg.hDC == NULL)
{
EMSG(_("E237: Printer selection failed"));
mch_print_cleanup();
return FALSE;
}
-
- /*
- * keep the previous driver context
- */
- stored_dm = prt_dlg.hDevMode;
- stored_devn = prt_dlg.hDevNames;
- stored_nFlags = prt_dlg.Flags;
- stored_nCopies = prt_dlg.nCopies;
/* Not all printer drivers report the support of color (or grey) in the
* same way. Let's set has_color if there appears to be some way to print
--- 1339,1361 ----
}
else if (PrintDlg(&prt_dlg) == 0)
goto init_fail_dlg;
+ else
+ {
+ /*
+ * keep the previous driver context
+ */
+ stored_dm = prt_dlg.hDevMode;
+ stored_devn = prt_dlg.hDevNames;
+ stored_nFlags = prt_dlg.Flags;
+ stored_nCopies = prt_dlg.nCopies;
+ }
+
if (prt_dlg.hDC == NULL)
{
EMSG(_("E237: Printer selection failed"));
mch_print_cleanup();
return FALSE;
}
/* Not all printer drivers report the support of color (or grey) in the
* same way. Let's set has_color if there appears to be some way to print
*** ../vim61a.004/src/version.c Mon Feb 25 22:33:43 2002
--- src/version.c Mon Feb 25 22:34:42 2002
***************
*** 608,609 ****
--- 608,611 ----
{ /* Add new patch number below this line */
+ /**/
+ 5,
/**/
--
Give a man a computer program and you give him a headache,
but teach him to program computers and you give him the power
to create headaches for others for the rest of his life...
R. B. Forest
/// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\
/// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
\\\ Project leader for A-A-P -- http://www.a-a-p.org ///
\\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
.