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

50592Re: Bug or feature? [-] for helpfiles when 'statusline' nonempty

Expand Messages
  • Bram Moolenaar
    May 30, 2004
      Antoine J. Mechelynck wrote:

      > With 'statusline' empty, "normal" files have [+] when modified, otherwise
      > nothing at that position; help files, at least when not modified (the usual
      > case), have nothing.
      > After
      > set statusline=%<%f\
      > %h%m%r%=%{\"[\".(&fenc==\"\"?&enc:&fenc).((exists(\"+bomb\")\ &&\
      > &bomb)?\",B\":\"\").\"]\ \"}%k\ %-14.(%l,%c%V%)\ %P
      > (all on one line), "normal" unmodified files still have nothing. Help files
      > have [-] even though ":setl mod?" answers "nomodified".
      > Bug or feature? My understanding was that %m means
      > print nothing if 'nomodified'
      > print [+] if 'modified' and 'noreadonly'
      > print [-] if 'modified' but 'readonly' (the help says if 'nomodifiable' but
      > how can we have 'modified' if 'nomodifiable'?)
      > Apparently I misunderstood? Does [-] mean 'nomodifiable' then, regardless of
      > 'modified' status (which will be off)? If so, why does that flag _not_
      > appear on helpfiles with 'statusline' empty?

      I don't know why you expected %m to behave this way. The docs mention:

      m F Modified flag, text is " [+]" or " [-]" if 'modifiable' is off.

      The idea is that a "normal" file doesn't show anything. It is not
      normal for a file to be not modifiable.

      With 'statusline' empty something a bit more clever is done, mentioning
      "help" is enough to let the user know what kind of buffer it is.

      A)bort, R)etry, B)ang it with a large hammer

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
      \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
    • Show all 4 messages in this topic