changeset 292:bf6ee000a80c

updated for version 7.0077
author vimboss
date Tue, 31 May 2005 22:09:46 +0000
parents 0ad8528b8c05
children f811be6fa9b5
files src/fileio.c src/gui.c src/mbyte.c src/os_unix.c src/os_win32.c src/proto/message.pro src/tag.c
diffstat 7 files changed, 73 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -6963,9 +6963,13 @@ aubuflocal_remove(buf)
 	    {
 		au_remove_pat(ap);
 		if (p_verbose >= 6)
+		{
+		    verbose_enter();
 		    smsg((char_u *)
 			    _("auto-removing autocommand: %s <buffer=%d>"),
 					   event_nr2name(event), buf->b_fnum);
+		    verbose_leave();
+		}
 	    }
     au_cleanup();
 }
@@ -8342,7 +8346,11 @@ auto_next_pat(apc, stop_at_last)
 		    sprintf((char *)sourcing_name, s,
 					       (char *)name, (char *)ap->pat);
 		    if (p_verbose >= 8)
+		    {
+			verbose_enter();
 			smsg((char_u *)_("Executing %s"), sourcing_name);
+			verbose_leave();
+		    }
 		}
 
 		apc->curpat = ap;
@@ -8409,10 +8417,10 @@ getnextac(c, cookie, indent)
 
     if (p_verbose >= 9)
     {
-	msg_scroll = TRUE;	    /* always scroll up, don't overwrite */
+	verbose_enter_scroll();
 	smsg((char_u *)_("autocommand %s"), ac->cmd);
 	msg_puts((char_u *)"\n");   /* don't overwrite this either */
-	cmdline_row = msg_row;
+	verbose_leave_scroll();
     }
     retval = vim_strsave(ac->cmd);
     autocmd_nested = ac->nested;
--- a/src/gui.c
+++ b/src/gui.c
@@ -3259,7 +3259,8 @@ gui_init_which_components(oldval)
 	     * change Columns and Rows when we don't want it.  Wait for a
 	     * character here to avoid this effect.
 	     * If you remove this, please test this command for resizing
-	     * effects: ":vsp|q|vsp|q|vsp|q" */
+	     * effects (with optional left scrollbar): ":vsp|q|vsp|q|vsp|q".
+	     * Don't do this while starting up though. */
 	    if (!gui.starting)
 		(void)char_avail();
 	    Rows = r;
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -3164,8 +3164,12 @@ iconv_enabled(verbose)
 	/* Only give the message when 'verbose' is set, otherwise it might be
 	 * done whenever a conversion is attempted. */
 	if (verbose && p_verbose > 0)
+	{
+	    verbose_enter();
 	    EMSG2(_(e_loadlib),
 		    hIconvDLL == 0 ? DYNAMIC_ICONV_DLL : DYNAMIC_MSVCRT_DLL);
+	    verbose_leave();
+	}
 	iconv_end();
 	return FALSE;
     }
@@ -3180,7 +3184,11 @@ iconv_enabled(verbose)
     {
 	iconv_end();
 	if (verbose && p_verbose > 0)
+	{
+	    verbose_enter();
 	    EMSG2(_(e_loadfunc), "for libiconv");
+	    verbose_leave();
+	}
 	return FALSE;
     }
     return TRUE;
@@ -4846,7 +4854,11 @@ xim_real_init(x11_window, x11_display)
 	/* Only give this message when verbose is set, because too many people
 	 * got this message when they didn't want to use a XIM. */
 	if (p_verbose > 0)
+	{
+	    verbose_enter();
 	    EMSG(_("E286: Failed to open input method"));
+	    verbose_leave();
+	}
 	return FALSE;
     }
 
@@ -4920,7 +4932,11 @@ xim_real_init(x11_window, x11_display)
 	/* Only give this message when verbose is set, because too many people
 	 * got this message when they didn't want to use a XIM. */
 	if (p_verbose > 0)
+	{
+	    verbose_enter();
 	    EMSG(_("E289: input method doesn't support my preedit type"));
+	    verbose_leave();
+	}
 	XCloseIM(xim);
 	return FALSE;
     }
@@ -5337,7 +5353,11 @@ xim_init(void)
     if (!gdk_im_ready())
     {
 	if (p_verbose > 0)
+	{
+	    verbose_enter();
 	    EMSG(_("E292: Input Method Server is not running"));
+	    verbose_leave();
+	}
 	return;
     }
     if ((xic_attr = gdk_ic_attr_new()) != NULL)
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -1451,7 +1451,7 @@ test_x11_window(dpy)
     (void)XSetErrorHandler(old_handler);
 
     if (p_verbose > 0 && got_x_error)
-	MSG(_("Testing the X display failed"));
+	verb_msg((char_u *)_("Testing the X display failed"));
 
     return (got_x_error ? FAIL : OK);
 }
@@ -1590,13 +1590,17 @@ get_x11_windis()
 	alarm(0);
 	signal(SIGALRM, (RETSIGTYPE (*)())sig_save);
 	if (p_verbose > 0 && sig_alarm_called)
-	    MSG(_("Opening the X display timed out"));
+	    verb_msg((char_u *)_("Opening the X display timed out"));
 #endif
 	if (x11_display != NULL)
 	{
 # if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
 	    if (p_verbose > 0)
+	    {
+		verbose_enter();
 		xopen_message(&start_tv);
+		verbose_leave();
+	    }
 # endif
 	    if (test_x11_window(x11_display) == FAIL)
 	    {
@@ -4507,7 +4511,7 @@ RealWaitForChar(fd, msec, check_for_gpm)
 	    else if (fds[xsmp_idx].revents & POLLHUP)
 	    {
 		if (p_verbose > 0)
-		    MSG(_("XSMP lost ICE connection"));
+		    verb_msg((char_u *)_("XSMP lost ICE connection"));
 		xsmp_close();
 	    }
 	    if (--ret == 0)
@@ -4649,7 +4653,7 @@ RealWaitForChar(fd, msec, check_for_gpm)
 	    if (FD_ISSET(xsmp_icefd, &efds))
 	    {
 		if (p_verbose > 0)
-		    MSG(_("XSMP lost ICE connection"));
+		    verb_msg((char_u *)_("XSMP lost ICE connection"));
 		xsmp_close();
 		if (--ret == 0)
 		    finished = FALSE;   /* keep going if event was only one */
@@ -5974,7 +5978,7 @@ setup_term_clip()
 	if (xterm_dpy == NULL)
 	{
 	    if (p_verbose > 0)
-		MSG(_("Opening the X display failed"));
+		verb_msg((char_u *)_("Opening the X display failed"));
 	    return;
 	}
 
@@ -5983,7 +5987,11 @@ setup_term_clip()
 
 # if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
 	if (p_verbose > 0)
+	{
+	    verbose_enter();
 	    xopen_message(&start_tv);
+	    verbose_leave();
+	}
 # endif
 
 	/* Create a Shell to make converters work. */
@@ -6296,7 +6304,7 @@ xsmp_handle_save_yourself(smc_conn, clie
     ml_sync_all(FALSE, FALSE);	/* preserve all swap files */
 
     if (p_verbose > 0)
-	MSG(_("XSMP handling save-yourself request"));
+	verb_msg((char_u *)_("XSMP handling save-yourself request"));
 
 # if defined(FEAT_GUI) && defined(USE_XSMP_INTERACT)
     /* Now see if we can ask about unsaved files */
@@ -6391,7 +6399,7 @@ xsmp_handle_requests()
     {
 	/* Lost ICE */
 	if (p_verbose > 0)
-	    MSG(_("XSMP lost ICE connection"));
+	    verb_msg((char_u *)_("XSMP lost ICE connection"));
 	xsmp_close();
 	return FAIL;
     }
@@ -6415,7 +6423,7 @@ xsmp_init(void)
 #endif
 
     if (p_verbose > 0)
-	MSG(_("XSMP opening connection"));
+	verb_msg((char_u *)_("XSMP opening connection"));
 
     xsmp.save_yourself = xsmp.shutdown = False;
 
@@ -6434,7 +6442,7 @@ xsmp_init(void)
     if (IceAddConnectionWatch(xsmp_ice_connection, &dummy) == 0)
     {
 	if (p_verbose > 0)
-	    MSG(_("XSMP ICE connection watch failed"));
+	    verb_msg((char_u *)_("XSMP ICE connection watch failed"));
 	return;
     }
 
@@ -6455,10 +6463,12 @@ xsmp_init(void)
     {
 	char errorreport[132];
 
-	vim_snprintf(errorreport, sizeof(errorreport),
+	if (p_verbose > 0)
+	{
+	    vim_snprintf(errorreport, sizeof(errorreport),
 			 _("XSMP SmcOpenConnection failed: %s"), errorstring);
-	if (p_verbose > 0)
-	    MSG(errorreport);
+	    verb_msg((char_u *)errorreport);
+	}
 	return;
     }
     xsmp.iceconn = SmcGetIceConnection(xsmp.smcconn);
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -274,7 +274,11 @@ dyn_libintl_init(char *libname)
 	if (!hLibintlDLL)
 	{
 	    if (p_verbose > 0)
+	    {
+		verbose_enter();
 		EMSG2(_(e_loadlib), GETTEXT_DLL);
+		verbose_leave();
+	    }
 	    return 0;
 	}
     }
@@ -286,7 +290,11 @@ dyn_libintl_init(char *libname)
 	{
 	    dyn_libintl_end();
 	    if (p_verbose > 0)
+	    {
+		verbose_enter();
 		EMSG2(_(e_loadfunc), libintl_entry[i].name);
+		verbose_leave();
+	    }
 	    return 0;
 	}
     }
--- a/src/proto/message.pro
+++ b/src/proto/message.pro
@@ -1,5 +1,6 @@
 /* message.c */
 int msg __ARGS((char_u *s));
+int verb_msg __ARGS((char_u *s));
 int msg_attr __ARGS((char_u *s, int attr));
 int msg_attr_keep __ARGS((char_u *s, int attr, int keep));
 char_u *msg_strtrunc __ARGS((char_u *s));
@@ -49,6 +50,12 @@ void msg_clr_eos_force __ARGS((void));
 void msg_clr_cmdline __ARGS((void));
 int msg_end __ARGS((void));
 void msg_check __ARGS((void));
+void verbose_enter __ARGS((void));
+void verbose_leave __ARGS((void));
+void verbose_enter_scroll __ARGS((void));
+void verbose_leave_scroll __ARGS((void));
+void verbose_stop __ARGS((void));
+int verbose_open __ARGS((void));
 void give_warning __ARGS((char_u *message, int hl));
 void msg_advance __ARGS((int col));
 int do_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield));
--- a/src/tag.c
+++ b/src/tag.c
@@ -1360,7 +1360,11 @@ find_tags(pat, num_matches, matchesp, fl
 		continue;
 
 	    if (p_verbose >= 5)
+	    {
+		verbose_enter();
 		smsg((char_u *)_("Searching tags file %s"), tag_fname);
+		verbose_leave();
+	    }
 	}
 	did_open = TRUE;    /* remember that we found at least one file */