To: vim-dev@vim.org Subject: Patch 6.1.288 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.288 Problem: ":silent function F" hangs. (Hari Krishna Dara) Solution: Don't use msg_col, it is not incremented when using ":silent". Also made the function output look a bit better. Don't translate "function". Files: src/eval.c *** ../vim61.287/src/eval.c Mon Jan 6 22:50:57 2003 --- src/eval.c Sun Jan 12 13:21:36 2003 *************** *** 344,350 **** static char_u *trans_function_name __ARGS((char_u **pp, int skip, int internal)); static int eval_fname_script __ARGS((char_u *p)); static int eval_fname_sid __ARGS((char_u *p)); ! static void list_func_head __ARGS((ufunc_T *fp)); static void cat_func_name __ARGS((char_u *buf, ufunc_T *fp)); static ufunc_T *find_func __ARGS((char_u *name)); static void call_func __ARGS((ufunc_T *fp, int argcount, VAR argvars, VAR retvar, linenr_T firstline, linenr_T lastline)); --- 344,350 ---- static char_u *trans_function_name __ARGS((char_u **pp, int skip, int internal)); static int eval_fname_script __ARGS((char_u *p)); static int eval_fname_sid __ARGS((char_u *p)); ! static void list_func_head __ARGS((ufunc_T *fp, int indent)); static void cat_func_name __ARGS((char_u *buf, ufunc_T *fp)); static ufunc_T *find_func __ARGS((char_u *name)); static void call_func __ARGS((ufunc_T *fp, int argcount, VAR argvars, VAR retvar, linenr_T firstline, linenr_T lastline)); *************** *** 7795,7801 **** { if (!eap->skip) for (fp = firstfunc; fp != NULL && !got_int; fp = fp->next) ! list_func_head(fp); eap->nextcmd = check_nextcmd(eap->arg); return; } --- 7810,7816 ---- { if (!eap->skip) for (fp = firstfunc; fp != NULL && !got_int; fp = fp->next) ! list_func_head(fp, FALSE); eap->nextcmd = check_nextcmd(eap->arg); return; } *************** *** 7823,7837 **** fp = find_func(name); if (fp != NULL) { ! list_func_head(fp); for (j = 0; j < fp->lines.ga_len; ++j) { msg_putchar('\n'); msg_outnum((long)(j + 1)); ! do ! { msg_putchar(' '); - } while (msg_col < 3); msg_prt_line(FUNCLINE(fp, j)); } MSG(" endfunction"); --- 7838,7852 ---- fp = find_func(name); if (fp != NULL) { ! list_func_head(fp, TRUE); for (j = 0; j < fp->lines.ga_len; ++j) { msg_putchar('\n'); msg_outnum((long)(j + 1)); ! if (j < 9) ! msg_putchar(' '); ! if (j < 99) msg_putchar(' '); msg_prt_line(FUNCLINE(fp, j)); } MSG(" endfunction"); *************** *** 8208,8219 **** * List the head of the function: "name(arg1, arg2)". */ static void ! list_func_head(fp) ufunc_T *fp; { int j; ! MSG(_("function ")); if (fp->name[0] == K_SPECIAL) { MSG_PUTS_ATTR("", hl_attr(HLF_8)); --- 8223,8238 ---- * List the head of the function: "name(arg1, arg2)". */ static void ! list_func_head(fp, indent) ufunc_T *fp; + int indent; { int j; ! msg_start(); ! if (indent) ! MSG_PUTS(" "); ! MSG_PUTS("function "); if (fp->name[0] == K_SPECIAL) { MSG_PUTS_ATTR("", hl_attr(HLF_8)); *** ../vim61.287/src/version.c Fri Jan 10 10:04:44 2003 --- src/version.c Sun Jan 12 13:25:35 2003 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 288, /**/ -- To the optimist, the glass is half full. To the pessimist, the glass is half empty. To the engineer, the glass is twice as big as it needs to be. /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.vim.org \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///