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

Re: Patch 7.2.356

Expand Messages
  • Ben Fritz
    ... Following these steps does not reproduce the problem for me, running the Cream install on Windows which is now up to 7.2.356. Thinking maybe something in
    Message 1 of 10 , Feb 4, 2010
    • 0 Attachment
      On Feb 4, 7:14 am, Chris Sutcliffe <ir0nh...@...> wrote:
      > > I can't reproduce the problem. Do you know the exact steps I have to
      > > take to do it?
      >
      > I can reproduce it by editing a cpp file with foldmethod=syntax,
      > typing 'zO' to open a fold, go in to the previously folded function
      > and type ':w' and the fold is closed.
      >

      Following these steps does not reproduce the problem for me, running
      the "Cream" install on Windows which is now up to 7.2.356.

      Thinking maybe something in my config was compensating for something,
      I tried again:

      gvim -N -u NONE -i NONE
      :set rtp-=$HOME/vimfiles
      :set rtp-=$HOME/vimfiles/after
      :filetype plugin indent on
      :syntax on
      :e test.c
      :set fdm=syntax

      I then open a fold for a function, edit the function, and :w.

      The fold continues to stay open.

      Maybe there's something in YOUR config causing the issue? Can you
      reproduce with none of your customizations, as I have tried?

      --
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Chris Sutcliffe
      ... It is indeed an issue in my config, in particular this line: au BufWritePost * nested filetype detect Which I use to re-read the ctags file so that
      Message 2 of 10 , Feb 4, 2010
      • 0 Attachment
        > Thinking maybe something in my config was compensating for something,
        > I tried again:
        >
        > gvim -N -u NONE -i NONE
        > :set rtp-=$HOME/vimfiles
        > :set rtp-=$HOME/vimfiles/after
        > :filetype plugin indent on
        > :syntax on
        > :e test.c
        > :set fdm=syntax
        >
        > I then open a fold for a function, edit the function, and :w.
        >
        > The fold continues to stay open.
        >
        > Maybe there's something in YOUR config causing the issue? Can you
        > reproduce with none of your customizations, as I have tried?

        It is indeed an issue in my config, in particular this line:

        au BufWritePost * nested filetype detect

        Which I use to re-read the ctags file so that Omni-complete has the
        latest information after a file is written. This worked without issue
        prior to this patch. Is there an alternate implementation I could use
        that would play nicely with this new implementation?

        Thank you,

        Chris

        --
        Chris Sutcliffe
        http://emergedesktop.org

        --
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
      • James Vega
        ... You shouldn t need to do this. If you have something automatically updating the tags database, Vim will always be up-to-date. Vim doesn t cache tags
        Message 3 of 10 , Feb 4, 2010
        • 0 Attachment
          On Thu, Feb 4, 2010 at 2:27 PM, Chris Sutcliffe <ir0nh34d@...> wrote:
          >> Thinking maybe something in my config was compensating for something,
          >> I tried again:
          >>
          >> gvim -N -u NONE -i NONE
          >> :set rtp-=$HOME/vimfiles
          >> :set rtp-=$HOME/vimfiles/after
          >> :filetype plugin indent on
          >> :syntax on
          >> :e test.c
          >> :set fdm=syntax
          >>
          >> I then open a fold for a function, edit the function, and :w.
          >>
          >> The fold continues to stay open.
          >>
          >> Maybe there's something in YOUR config causing the issue? Can you
          >> reproduce with none of your customizations, as I have tried?
          >
          > It is indeed an issue in my config, in particular this line:
          >
          >        au BufWritePost * nested filetype detect
          >
          > Which I use to re-read the ctags file so that Omni-complete has the
          > latest information after a file is written.

          You shouldn't need to do this. If you have something automatically
          updating the tags database, Vim will always be up-to-date. Vim doesn't
          cache tags info. It always reads from the file. If you're seeing
          otherwise, then it may be that the omnicompletion script is caching the
          tag information and I'd consider that a bug.

          --
          James
          GPG Key: 1024D/61326D40 2003-09-02 James Vega <jamessan@...>

          --
          You received this message from the "vim_dev" maillist.
          For more information, visit http://www.vim.org/maillist.php
        • Chris Sutcliffe
          ... I ve sorted it out... I originally had: Create tags file au FileType cpp call CreateTags() au BufWritePost * nested filetype detect Where: Create
          Message 4 of 10 , Feb 4, 2010
          • 0 Attachment
            >> It is indeed an issue in my config, in particular this line:
            >>
            >>        au BufWritePost * nested filetype detect
            >>
            >> Which I use to re-read the ctags file so that Omni-complete has the
            >> latest information after a file is written.
            >
            > You shouldn't need to do this.  If you have something automatically
            > updating the tags database, Vim will always be up-to-date.  Vim doesn't
            > cache tags info.  It always reads from the file.  If you're seeing
            > otherwise, then it may be that the omnicompletion script is caching the
            > tag information and I'd consider that a bug.

            I've sorted it out... I originally had:

            " Create tags file
            au FileType cpp call CreateTags()
            au BufWritePost * nested filetype detect

            Where:

            " Create CTags for all files in the current directory
            function! CreateTags()
            let currdir = expand('%:p:h')
            let currtags = currdir.'/tags'
            if getftime(expand('%')) > getftime(currtags)
            silent execute '!ctags *'
            endif
            endfunction

            Which would create a tags file in the current directory if the tags
            file was older than the age of the file being opened (based on the
            file type detection). In order to update the tags file when the file
            was written, I had to force a file type detection again.

            I've now changed it to:

            " Create tags file
            au FileType cpp call CreateTags()
            au BufWritePost * if &ft == 'cpp' | silent execute '!ctags *' | endif

            Which works in similar fashion but doesn't cause the undesired fold collapsing.

            Chris

            --
            Chris Sutcliffe
            http://emergedesktop.org

            --
            You received this message from the "vim_dev" maillist.
            For more information, visit http://www.vim.org/maillist.php
          • Ben Fritz
            The original problem may have been solved, but take a look at this current vim_use thread. A new one seems to have popped up:
            Message 5 of 10 , Feb 4, 2010
            • 0 Attachment
              The original problem may have been solved, but take a look at this
              current vim_use thread. A new one seems to have popped up:

              http://groups.google.com/group/vim_use/browse_thread/thread/9f4c69b6693e8838

              --
              You received this message from the "vim_dev" maillist.
              For more information, visit http://www.vim.org/maillist.php
            • Chris Sutcliffe
              ... Additionally, now doing a refresh with Ctrl-L also causes all the folds to collapse (which didn t happen before). Chris -- Chris Sutcliffe
              Message 6 of 10 , Feb 5, 2010
              • 0 Attachment
                > The original problem may have been solved, but take a look at this
                > current vim_use thread. A new one seems to have popped up:
                >
                > http://groups.google.com/group/vim_use/browse_thread/thread/9f4c69b6693e8838

                Additionally, now doing a refresh with Ctrl-L also causes all the
                folds to collapse (which didn't happen before).

                Chris

                --
                Chris Sutcliffe
                http://emergedesktop.org

                --
                You received this message from the "vim_dev" maillist.
                For more information, visit http://www.vim.org/maillist.php
              Your message has been successfully submitted and would be delivered to recipients shortly.