1
0
forked from aniani/vim

updated for version 7.0077

This commit is contained in:
Bram Moolenaar
2005-05-31 22:09:46 +00:00
parent 8b044b3264
commit a04f10b606
7 changed files with 73 additions and 15 deletions

View File

@@ -6963,9 +6963,13 @@ aubuflocal_remove(buf)
{ {
au_remove_pat(ap); au_remove_pat(ap);
if (p_verbose >= 6) if (p_verbose >= 6)
{
verbose_enter();
smsg((char_u *) smsg((char_u *)
_("auto-removing autocommand: %s <buffer=%d>"), _("auto-removing autocommand: %s <buffer=%d>"),
event_nr2name(event), buf->b_fnum); event_nr2name(event), buf->b_fnum);
verbose_leave();
}
} }
au_cleanup(); au_cleanup();
} }
@@ -8342,7 +8346,11 @@ auto_next_pat(apc, stop_at_last)
sprintf((char *)sourcing_name, s, sprintf((char *)sourcing_name, s,
(char *)name, (char *)ap->pat); (char *)name, (char *)ap->pat);
if (p_verbose >= 8) if (p_verbose >= 8)
{
verbose_enter();
smsg((char_u *)_("Executing %s"), sourcing_name); smsg((char_u *)_("Executing %s"), sourcing_name);
verbose_leave();
}
} }
apc->curpat = ap; apc->curpat = ap;
@@ -8409,10 +8417,10 @@ getnextac(c, cookie, indent)
if (p_verbose >= 9) if (p_verbose >= 9)
{ {
msg_scroll = TRUE; /* always scroll up, don't overwrite */ verbose_enter_scroll();
smsg((char_u *)_("autocommand %s"), ac->cmd); smsg((char_u *)_("autocommand %s"), ac->cmd);
msg_puts((char_u *)"\n"); /* don't overwrite this either */ msg_puts((char_u *)"\n"); /* don't overwrite this either */
cmdline_row = msg_row; verbose_leave_scroll();
} }
retval = vim_strsave(ac->cmd); retval = vim_strsave(ac->cmd);
autocmd_nested = ac->nested; autocmd_nested = ac->nested;

View File

@@ -3259,7 +3259,8 @@ gui_init_which_components(oldval)
* change Columns and Rows when we don't want it. Wait for a * change Columns and Rows when we don't want it. Wait for a
* character here to avoid this effect. * character here to avoid this effect.
* If you remove this, please test this command for resizing * 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) if (!gui.starting)
(void)char_avail(); (void)char_avail();
Rows = r; Rows = r;

View File

@@ -3164,8 +3164,12 @@ iconv_enabled(verbose)
/* Only give the message when 'verbose' is set, otherwise it might be /* Only give the message when 'verbose' is set, otherwise it might be
* done whenever a conversion is attempted. */ * done whenever a conversion is attempted. */
if (verbose && p_verbose > 0) if (verbose && p_verbose > 0)
{
verbose_enter();
EMSG2(_(e_loadlib), EMSG2(_(e_loadlib),
hIconvDLL == 0 ? DYNAMIC_ICONV_DLL : DYNAMIC_MSVCRT_DLL); hIconvDLL == 0 ? DYNAMIC_ICONV_DLL : DYNAMIC_MSVCRT_DLL);
verbose_leave();
}
iconv_end(); iconv_end();
return FALSE; return FALSE;
} }
@@ -3180,7 +3184,11 @@ iconv_enabled(verbose)
{ {
iconv_end(); iconv_end();
if (verbose && p_verbose > 0) if (verbose && p_verbose > 0)
{
verbose_enter();
EMSG2(_(e_loadfunc), "for libiconv"); EMSG2(_(e_loadfunc), "for libiconv");
verbose_leave();
}
return FALSE; return FALSE;
} }
return TRUE; 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 /* Only give this message when verbose is set, because too many people
* got this message when they didn't want to use a XIM. */ * got this message when they didn't want to use a XIM. */
if (p_verbose > 0) if (p_verbose > 0)
{
verbose_enter();
EMSG(_("E286: Failed to open input method")); EMSG(_("E286: Failed to open input method"));
verbose_leave();
}
return FALSE; 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 /* Only give this message when verbose is set, because too many people
* got this message when they didn't want to use a XIM. */ * got this message when they didn't want to use a XIM. */
if (p_verbose > 0) if (p_verbose > 0)
{
verbose_enter();
EMSG(_("E289: input method doesn't support my preedit type")); EMSG(_("E289: input method doesn't support my preedit type"));
verbose_leave();
}
XCloseIM(xim); XCloseIM(xim);
return FALSE; return FALSE;
} }
@@ -5337,7 +5353,11 @@ xim_init(void)
if (!gdk_im_ready()) if (!gdk_im_ready())
{ {
if (p_verbose > 0) if (p_verbose > 0)
{
verbose_enter();
EMSG(_("E292: Input Method Server is not running")); EMSG(_("E292: Input Method Server is not running"));
verbose_leave();
}
return; return;
} }
if ((xic_attr = gdk_ic_attr_new()) != NULL) if ((xic_attr = gdk_ic_attr_new()) != NULL)

View File

@@ -1451,7 +1451,7 @@ test_x11_window(dpy)
(void)XSetErrorHandler(old_handler); (void)XSetErrorHandler(old_handler);
if (p_verbose > 0 && got_x_error) 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); return (got_x_error ? FAIL : OK);
} }
@@ -1590,13 +1590,17 @@ get_x11_windis()
alarm(0); alarm(0);
signal(SIGALRM, (RETSIGTYPE (*)())sig_save); signal(SIGALRM, (RETSIGTYPE (*)())sig_save);
if (p_verbose > 0 && sig_alarm_called) 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 #endif
if (x11_display != NULL) if (x11_display != NULL)
{ {
# if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H) # if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
if (p_verbose > 0) if (p_verbose > 0)
{
verbose_enter();
xopen_message(&start_tv); xopen_message(&start_tv);
verbose_leave();
}
# endif # endif
if (test_x11_window(x11_display) == FAIL) if (test_x11_window(x11_display) == FAIL)
{ {
@@ -4507,7 +4511,7 @@ RealWaitForChar(fd, msec, check_for_gpm)
else if (fds[xsmp_idx].revents & POLLHUP) else if (fds[xsmp_idx].revents & POLLHUP)
{ {
if (p_verbose > 0) if (p_verbose > 0)
MSG(_("XSMP lost ICE connection")); verb_msg((char_u *)_("XSMP lost ICE connection"));
xsmp_close(); xsmp_close();
} }
if (--ret == 0) if (--ret == 0)
@@ -4649,7 +4653,7 @@ RealWaitForChar(fd, msec, check_for_gpm)
if (FD_ISSET(xsmp_icefd, &efds)) if (FD_ISSET(xsmp_icefd, &efds))
{ {
if (p_verbose > 0) if (p_verbose > 0)
MSG(_("XSMP lost ICE connection")); verb_msg((char_u *)_("XSMP lost ICE connection"));
xsmp_close(); xsmp_close();
if (--ret == 0) if (--ret == 0)
finished = FALSE; /* keep going if event was only one */ finished = FALSE; /* keep going if event was only one */
@@ -5974,7 +5978,7 @@ setup_term_clip()
if (xterm_dpy == NULL) if (xterm_dpy == NULL)
{ {
if (p_verbose > 0) if (p_verbose > 0)
MSG(_("Opening the X display failed")); verb_msg((char_u *)_("Opening the X display failed"));
return; return;
} }
@@ -5983,7 +5987,11 @@ setup_term_clip()
# if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H) # if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
if (p_verbose > 0) if (p_verbose > 0)
{
verbose_enter();
xopen_message(&start_tv); xopen_message(&start_tv);
verbose_leave();
}
# endif # endif
/* Create a Shell to make converters work. */ /* Create a Shell to make converters work. */
@@ -6296,7 +6304,7 @@ xsmp_handle_save_yourself(smc_conn, client_data, save_type,
ml_sync_all(FALSE, FALSE); /* preserve all swap files */ ml_sync_all(FALSE, FALSE); /* preserve all swap files */
if (p_verbose > 0) 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) # if defined(FEAT_GUI) && defined(USE_XSMP_INTERACT)
/* Now see if we can ask about unsaved files */ /* Now see if we can ask about unsaved files */
@@ -6391,7 +6399,7 @@ xsmp_handle_requests()
{ {
/* Lost ICE */ /* Lost ICE */
if (p_verbose > 0) if (p_verbose > 0)
MSG(_("XSMP lost ICE connection")); verb_msg((char_u *)_("XSMP lost ICE connection"));
xsmp_close(); xsmp_close();
return FAIL; return FAIL;
} }
@@ -6415,7 +6423,7 @@ xsmp_init(void)
#endif #endif
if (p_verbose > 0) if (p_verbose > 0)
MSG(_("XSMP opening connection")); verb_msg((char_u *)_("XSMP opening connection"));
xsmp.save_yourself = xsmp.shutdown = False; xsmp.save_yourself = xsmp.shutdown = False;
@@ -6434,7 +6442,7 @@ xsmp_init(void)
if (IceAddConnectionWatch(xsmp_ice_connection, &dummy) == 0) if (IceAddConnectionWatch(xsmp_ice_connection, &dummy) == 0)
{ {
if (p_verbose > 0) if (p_verbose > 0)
MSG(_("XSMP ICE connection watch failed")); verb_msg((char_u *)_("XSMP ICE connection watch failed"));
return; return;
} }
@@ -6455,10 +6463,12 @@ xsmp_init(void)
{ {
char errorreport[132]; char errorreport[132];
vim_snprintf(errorreport, sizeof(errorreport),
_("XSMP SmcOpenConnection failed: %s"), errorstring);
if (p_verbose > 0) if (p_verbose > 0)
MSG(errorreport); {
vim_snprintf(errorreport, sizeof(errorreport),
_("XSMP SmcOpenConnection failed: %s"), errorstring);
verb_msg((char_u *)errorreport);
}
return; return;
} }
xsmp.iceconn = SmcGetIceConnection(xsmp.smcconn); xsmp.iceconn = SmcGetIceConnection(xsmp.smcconn);

View File

@@ -274,7 +274,11 @@ dyn_libintl_init(char *libname)
if (!hLibintlDLL) if (!hLibintlDLL)
{ {
if (p_verbose > 0) if (p_verbose > 0)
{
verbose_enter();
EMSG2(_(e_loadlib), GETTEXT_DLL); EMSG2(_(e_loadlib), GETTEXT_DLL);
verbose_leave();
}
return 0; return 0;
} }
} }
@@ -286,7 +290,11 @@ dyn_libintl_init(char *libname)
{ {
dyn_libintl_end(); dyn_libintl_end();
if (p_verbose > 0) if (p_verbose > 0)
{
verbose_enter();
EMSG2(_(e_loadfunc), libintl_entry[i].name); EMSG2(_(e_loadfunc), libintl_entry[i].name);
verbose_leave();
}
return 0; return 0;
} }
} }

View File

@@ -1,5 +1,6 @@
/* message.c */ /* message.c */
int msg __ARGS((char_u *s)); 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 __ARGS((char_u *s, int attr));
int msg_attr_keep __ARGS((char_u *s, int attr, int keep)); int msg_attr_keep __ARGS((char_u *s, int attr, int keep));
char_u *msg_strtrunc __ARGS((char_u *s)); 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)); void msg_clr_cmdline __ARGS((void));
int msg_end __ARGS((void)); int msg_end __ARGS((void));
void msg_check __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 give_warning __ARGS((char_u *message, int hl));
void msg_advance __ARGS((int col)); 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)); int do_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield));

View File

@@ -1360,7 +1360,11 @@ find_tags(pat, num_matches, matchesp, flags, mincount, buf_ffname)
continue; continue;
if (p_verbose >= 5) if (p_verbose >= 5)
{
verbose_enter();
smsg((char_u *)_("Searching tags file %s"), tag_fname); smsg((char_u *)_("Searching tags file %s"), tag_fname);
verbose_leave();
}
} }
did_open = TRUE; /* remember that we found at least one file */ did_open = TRUE; /* remember that we found at least one file */