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

50619RE: Bug or feature? [-] for helpfiles when 'statusline' nonempty

Expand Messages
  • Keith Roberts
    Jun 1 10:26 AM
    • 0 Attachment
      >-----Original Message-----
      >From: Bram@... [mailto:Bram@...]
      >Sent: Sunday, May 30, 2004 9:52 AM
      >To: Antoine J. Mechelynck
      >Cc: vim@...
      >Subject: Re: Bug or feature? [-] for helpfiles when
      >'statusline' nonempty
      >
      >
      >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.

      It is ambiguous to me as well. You might change it to:
      m F Modified flag, text is " [+]" if modified, or " [-]" if
      'modifiable' is off.
    • Show all 4 messages in this topic