Patch 8.0.0688
Problem:    Cannot resize the window in a FileType autocommand. (Ingo Karkat)
Solution:   Add the CMDWIN flag to :resize. (test by Ingo Karkat,
            closes #1804)
Files:      src/ex_cmds.h, src/testdir/test_quickfix.vim



*** ../vim-8.0.0687/src/ex_cmds.h       2017-06-22 19:15:20.161602227 +0200
--- src/ex_cmds.h       2017-06-28 22:26:36.050824738 +0200
***************
*** 51,57 ****
  #define BUFUNL              0x20000L  /* accepts unlisted buffer too */
  #define ARGOPT              0x40000L  /* allow "++opt=val" argument */
  #define SBOXOK              0x80000L  /* allowed in the sandbox */
! #define CMDWIN             0x100000L  /* allowed in cmdline window */
  #define MODIFY       0x200000L        /* forbidden in non-'modifiable' buffer 
*/
  #define EXFLAGS      0x400000L        /* allow flags after count in argument 
*/
  #define FILES (XFILE | EXTRA) /* multiple extra files allowed */
--- 51,59 ----
  #define BUFUNL              0x20000L  /* accepts unlisted buffer too */
  #define ARGOPT              0x40000L  /* allow "++opt=val" argument */
  #define SBOXOK              0x80000L  /* allowed in the sandbox */
! #define CMDWIN             0x100000L  /* allowed in cmdline window; when 
missing
!                                * disallows editing another buffer when
!                                * curbuf_lock is set */
  #define MODIFY       0x200000L        /* forbidden in non-'modifiable' buffer 
*/
  #define EXFLAGS      0x400000L        /* allow flags after count in argument 
*/
  #define FILES (XFILE | EXTRA) /* multiple extra files allowed */
***************
*** 1176,1182 ****
                        EXTRA|NOTRLCOM|TRLBAR|CMDWIN,
                        ADDR_LINES),
  EX(CMD_resize,                "resize",       ex_resize,
!                       RANGE|NOTADR|TRLBAR|WORD1,
                        ADDR_LINES),
  EX(CMD_retab,         "retab",        ex_retab,
                        TRLBAR|RANGE|WHOLEFOLD|DFLALL|BANG|WORD1|CMDWIN|MODIFY,
--- 1178,1184 ----
                        EXTRA|NOTRLCOM|TRLBAR|CMDWIN,
                        ADDR_LINES),
  EX(CMD_resize,                "resize",       ex_resize,
!                       RANGE|NOTADR|TRLBAR|WORD1|CMDWIN,
                        ADDR_LINES),
  EX(CMD_retab,         "retab",        ex_retab,
                        TRLBAR|RANGE|WHOLEFOLD|DFLALL|BANG|WORD1|CMDWIN|MODIFY,
*** ../vim-8.0.0687/src/testdir/test_quickfix.vim       2017-06-28 
21:26:24.122302194 +0200
--- src/testdir/test_quickfix.vim       2017-06-28 22:19:06.502290844 +0200
***************
*** 2190,2207 ****
    set efm&vim
  endfunc
  
- func Test_cclose_from_copen()
-     augroup QF_Test
-       au!
-         au FileType qf :call assert_fails(':cclose', 'E788')
-     augroup END
-     copen
-     augroup QF_Test
-       au!
-     augroup END
-     augroup! QF_Test
- endfunc
- 
  " Tests for getting the quickfix stack size
  func XsizeTests(cchar)
    call s:setup_commands(a:cchar)
--- 2190,2195 ----
***************
*** 2231,2236 ****
--- 2219,2236 ----
    call XsizeTests('l')
  endfunc
  
+ func Test_cclose_from_copen()
+     augroup QF_Test
+       au!
+         au FileType qf :call assert_fails(':cclose', 'E788')
+     augroup END
+     copen
+     augroup QF_Test
+       au!
+     augroup END
+     augroup! QF_Test
+ endfunc
+ 
  func Test_cclose_in_autocmd()
    " Problem is only triggered if "starting" is zero, so that the OptionsSet
    " event will be triggered.
***************
*** 2246,2248 ****
--- 2246,2265 ----
    augroup! QF_Test
    call test_override('starting', 0)
  endfunc
+ 
+ func Test_resize_from_copen()
+     augroup QF_Test
+       au!
+         au FileType qf resize 5
+     augroup END
+     try
+       " This should succeed without any exception.  No other buffers are
+       " involved in the autocmd.
+       copen
+     finally
+       augroup QF_Test
+           au!
+       augroup END
+       augroup! QF_Test
+     endtry
+ endfunc
*** ../vim-8.0.0687/src/version.c       2017-06-28 21:26:24.126302163 +0200
--- src/version.c       2017-06-28 22:17:05.559221745 +0200
***************
*** 766,767 ****
--- 766,769 ----
  {   /* Add new patch number below this line */
+ /**/
+     688,
  /**/

-- 
>From "know your smileys":
 +<(:-) The Pope

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