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

Re: Bug: filetypes that rely on &sw fail after the patch which allows sw to be 0

Expand Messages
  • So8res
    Aaand two problems with the above patches: 1. Forgot to declare f_shiftwidth as static void 2. syntax error declaring s:Shiftwidth() (yes I m embarrassed, I
    Message 1 of 19 , Oct 16, 2012
    • 0 Attachment
      Aaand two problems with the above patches:
      1. Forgot to declare f_shiftwidth as static void
      2. syntax error declaring s:Shiftwidth() (yes I'm embarrassed, I tested against a build that didn't allow sw=0...)

      Here are the fixed ones:


      On Tuesday, October 16, 2012 3:05:22 PM UTC-7, So8res wrote:
      > Good idea.
      >
      > > I would rather suggest not having s:Shiftwidth with has(), but have has() at the top level:
      > >
      > >
      > >
      > > if exists('*shiftwidth')
      > >
      > > let s:Shiftwidth=function('shiftwidth')
      > >
      > > else
      > >
      > > function s:Shiftwidth()
      > >
      > > return &sw
      > >
      > > endfunction
      > >
      > > endif

      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.