On 10/12/07, Bram Moolenaar <[EMAIL PROTECTED]> wrote: > > > Yakov Lerner wrote: > > > On 10/11/07, Bram Moolenaar <[EMAIL PROTECTED]> wrote: > > > > > > > > > Yakov Lerner wrote: > > > > > > > :help :! says: > > > > :silent !{cmd} > > > > The screen is not redrawn then, thus you have to use > > > > CTRL-L or ":redraw!" if the command did display something. > > > > > > > > The last part ("if the command did display something") is not true. > > > > In console vim, screen is always grabled after ':silent !CMD" > > > > even if CMD did not print anything. (try ':silent !true' after > ':help > > > > help'). > > > > The correct wording would be: > > > > > > > > :silent !{cmd} > > > > The screen is not redrawn then, thus you have to use > > > > CTRL-L or ":redraw!" even if the command did not display > anything. > > > > > > The docs are correct, ":silent !true" doesn't mess up the display for > > > me. > > > > > > Check your shell init scripts for something that produces output. > > > > > > To make sure that shell init script are not even invoked, I set > > :set shell=/bin/true > > Still, screen is cleared after :silent !/bin/true. > > In gdb, I caught the place and the string that clears the screen. > > The string is "\033[?1049h\033[?1h\033=" (length=15). > > It is printed after fork+execve("/bin/true"), at this place: > > > > mch_write ( s=0x820b040 "\033[?1049h\033[?1h\033="..., len=15) at > > os_unix.c:307 > > 307 write(1, (char *)s, len); > > (gdb) n > > > > [Yakov] the vim screen is cleared at after the write() above > > > > 308 if (p_wd) /* Unix is too fast, slow down a bit > more */ > > (gdb) where > > #0 mch_write ( > > s=0x820b040 "\033[?1049h\033[?1h\033="..., len=15) at os_unix.c:308 > > #1 0x081a2b74 in ui_write ( > > s=0x820b040 "\033[?1049h\033[?1h\033="..., len=15) at ui.c:51 > > #2 0x0819ed96 in out_flush () at term.c:2545 > > #3 0x0819fa6a in starttermcap () at term.c:3233 > > #4 0x08090393 in do_shell (cmd=0x82155d8 "/bin/true", flags=0) at > > ex_cmds.c:1471 > > Apparently your termcap settings are causing this. Try this: > :set t_ti= t_ks=
Didn't help. The issue is related to terminal emulator somehow. Under minicom, ':silent !' works as documented (minicom emulation set to "ANSI"). Under xterm and konsole, ':silent !true' clears the screen. Bram, which terminal emulator are you using ? It might have something to do with the colorscheme you are using, esp. > if you are using a non-default background color. This is 'vim -u NONE', i.e. default everything. Yakov --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---