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

69618Re: [patch] get quickfix stack

Expand Messages
  • Bram Moolenaar
    May 15, 2013
    • 0 Attachment
      Christian Brabandt wrote:

      > Hi Bram!
      >
      > On So, 12 Mai 2013, Bram Moolenaar wrote:
      >
      > >
      > > Christian Brabandt wrote:
      > >
      > > > On So, 12 Mai 2013, Bram Moolenaar wrote:
      > > >
      > > > > Wouldn't it be better to have the entries and the titles in a list?
      > > >
      > > > We could do this as well. I don't mind.
      > > >
      > > > > If getqfstack() is to be used to restore, how does one do that restore?
      > > >
      > > > The idea is to do something like
      > > > " get location list stack
      > > > : let stack = getlocstack(0)
      > > > " jump to first location list
      > > > :lolder 10
      > > > " repopulate location lists
      > > > :for id in range(10)
      > > > exe printf("call setqflist(a.entry%d, '', a.title%d)", id,id)
      > > > endfor
      > >
      > > Hmm, that's doable, but not simple. What if the returned structure
      > > changes? It's probably better to add setlocstac().
      >
      > Here is an updated patch, containing setlocstack()/setqfstack() function
      > and which also includes the title list suggestion. For some reason, the
      > stack returned by getqfstack()/getlocstack() looks a little bit weird:
      >
      > Here an example for an empty stack:
      > {'entry6': [{}], 'entry7': [{}], 'entry8': [{}], 'entry9': [{}],
      > 'title': ['', '', '', '', '', '', '', '', '', ''], 'cur': 0, 'entry0':
      > [{}], 'entry1': [{}], 'entry2': [{}], 'entry3': [{}], 'entry4': [{}],
      > 'entry5': [{}]}
      >
      > (Note, that there are entry6, entry7, entry8, entry9, then comes the
      > title list and current item and finally there are the remaining entry0
      > till entry5 items).
      >
      > I am not sure, what causes this. But other then that, it seems to work.

      In a dictionary hashing is used, the keys are stored in semi-random
      order.

      I see there is still a discussion about how to use the functions.
      It might help to try explain in the help what these functions are used
      for. If it's not for restoring state, then the set functions might not
      be needed.


      --
      f y cn rd ths thn y cn hv grt jb n cmptr prgrmmng

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ an exciting new programming language -- http://www.Zimbu.org ///
      \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

      --
      --
      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

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 21 messages in this topic