Loading ...
Sorry, an error occurred while loading the content.

Re: some colorschemes cause truncated output from the script

Expand Messages
  • Yakov Lerner
    ... Thanks, I understand what happens now. I didn t know Normal must be defined first. Probably printing Grey xxx is better than nothing when group was
    Message 1 of 3 , Feb 28, 2006
    • 0 Attachment
      "Bram Moolenaar" <Bram@...> wrote:
      >
      > Yakov Lerner wrote:
      >
      > > Compare two outputs:
      > > (1) output from:
      > > vim -u NONE -c 'color zellner|so z.vim'
      > > (2) output from:
      > > vim -u NONE -c 'color blue|so z.vim'
      > > Where script z.vim is below. Correct output, from (2),
      > > has 7 lines not including the "Press Enter Prompt".
      > >
      > > Number (1) produces apparently incorrect output; it
      > > has two problems:
      > > a) it is truncated by 2-3 lines
      > > b) colors are nor applied at all, unlike in (2)
      > >
      > > Colorschemes that cause truncated & discolored output are:
      > > - default, delek, zellner, peachpuff, shine.
      > >
      > > Yakov
      > >
      > > Here is script z.vim:
      > > ------------------------------------------------
      > > " z.vim. with 'color zellner', this causes truncated
      > > " and discolored output
      > > syn clear
      > > hi Grey ctermfg=grey ctermbg=black
      > > hi White ctermfg=white ctermbg=black
      > > hi Normal cterm=bold ctermfg=white ctermbg=0
      > > echohl White
      > > echo "-> this shall be white"
      > > echohl Grey
      > > echo "-> this shall be gray"
      > > "
      > > echo " "
      > > echo "Just for reference:"
      > > hi Grey
      > > hi White
      > > hi Normal
      > > --------------------------------------------
      >
      > This is expected, even though what happens is complicated. It took me a
      > while to figure it out...
      >
      > The explanation can be found here: :help :hi-normal-cterm
      >
      > Since the highlight groups are cleared they don't produce any output.
      > Perhaps it's better when "hi Grey" mentions that the group was cleared?

      Thanks, I understand what happens now. I didn't know Normal must be
      defined first.
      Probably printing "Grey xxx" is better than nothing when group was
      cleared.

      Yakov
      --

      iler_ml@...

      --
      http://www.fastmail.fm - mmm... Fastmail...
    Your message has been successfully submitted and would be delivered to recipients shortly.