Patch 7.4.1137
Problem:    Illegal memory access when using :copen and :cclose.
Solution:   Avoid that curbuf is invalid. (suggestion by Justin M. Keyes)
            Add a test.
Files:      src/window.c, src/testdir/test_quickfix.vim


*** ../vim-7.4.1136/src/window.c        2015-12-31 19:06:56.060081779 +0100
--- src/window.c        2016-01-19 14:49:25.272858296 +0100
***************
*** 2445,2450 ****
--- 2445,2454 ----
        if (win_valid(win))
            win->w_closing = FALSE;
  #endif
+       /* Make sure curbuf is valid. It can become invalid if 'bufhidden' is
+        * "wipe". */
+       if (!buf_valid(curbuf))
+           curbuf = firstbuf;
      }
  
      if (only_one_window() && win_valid(win) && win->w_buffer == NULL
*** ../vim-7.4.1136/src/testdir/test_quickfix.vim       2016-01-15 
20:48:09.858003274 +0100
--- src/testdir/test_quickfix.vim       2016-01-19 14:48:22.405530470 +0100
***************
*** 295,298 ****
--- 295,304 ----
  
  endfunc
  
+ function Test_helpgrep()
+   helpgrep quickfix
+   copen
+   " This wipes out the buffer, make sure that doesn't cause trouble.
+   cclose
+ endfunc
  
*** ../vim-7.4.1136/src/version.c       2016-01-19 14:31:14.448578407 +0100
--- src/version.c       2016-01-19 14:37:37.708458511 +0100
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     1137,
  /**/

-- 
All good vision statements are created by groups of people with bloated
bladders who would rather be doing anything else.
                                (Scott Adams - The Dilbert principle)

 /// Bram Moolenaar -- [email protected] -- 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui