Hello,

I met a problem with the 2html.vim under the ex-mode with a silent
mode option.
I found that the 2html was work nicely with the vim 6.3 but vim 6.4,
vim7.x and later.


when I want a "xterm" color scheme in the exmode (with the silent
mode) It can't change terminal type.
and Iv found that the termcapinit() does not work correctly under the
silent mode.

------ X --------
set_termname(term)
    char_u *term;
{
    struct builtin_term *termp;
#ifdef HAVE_TGETENT
    int         builtin_first = p_tbi;
    int         try;
    int         termcap_cleared = FALSE;
#endif
    int         width = 0, height = 0;
    char_u      *error_msg = NULL;
    char_u      *bs_p, *del_p;

    /* In silect mode (ex -s) we don't use the 'term' option. */
    if (silent_mode)
        return OK;
...
----- X ------
with a simple patch I got a right result with the 2html.vim. (this
patch just revert term.c just like as the vim6.3 does)

--- term.c.orig 2008-08-29 07:45:42.000000000 +0900
+++ term.c      2008-08-29 07:46:09.000000000 +0900
@@ -1604,10 +1604,6 @@
     char_u     *error_msg = NULL;
     char_u     *bs_p, *del_p;

-    /* In silect mode (ex -s) we don't use the 'term' option. */
-    if (silent_mode)
-       return OK;
-
     detected_8bit = FALSE;             /* reset 8-bit detection */

     if (term_is_builtin(term))
----------- end of patch ------------

and following  command works fine. ( +"set term=xterm" now can change
the terminal type under the silent mode)

$ ./vim -E -s mysource.c +"set term=xterm" +"syntax on" +"set
syntax=c" +"set background=dark" +"let html_no_pre=1" +"ru!
$VIMRUNTIME/syntax/2html.vim" +"wq! mysource.html" +q

(without +"set term=xterm" args the vim6.3 works fine with the
2html.vim)
Im not sure this is a right answer or not.

Please check this problem~

Regards,

Wonkyu  Park

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui