Patch 8.0.1427
Problem:    The :leftabove modifier doesn't work for :copen.
Solution:   Respect the split modifier. (Yegappan Lakshmanan, closes #2496)
Files:      src/quickfix.c, src/testdir/test_quickfix.vim


*** ../vim-8.0.1426/src/quickfix.c      2017-12-21 20:54:45.129204547 +0100
--- src/quickfix.c      2017-12-26 13:50:10.096676893 +0100
***************
*** 3222,3227 ****
--- 3222,3229 ----
      }
      else
      {
+       int flags = 0;
+ 
        qf_buf = qf_find_buf(qi);
  
        /* The current window becomes the previous window afterwards. */
***************
*** 3229,3238 ****
  
        if ((eap->cmdidx == CMD_copen || eap->cmdidx == CMD_cwindow)
                && cmdmod.split == 0)
!           /* Create the new window at the very bottom, except when
             * :belowright or :aboveleft is used. */
            win_goto(lastwin);
!       if (win_split(height, WSP_BELOW | WSP_NEWLOC) == FAIL)
            return;             /* not enough room for window */
        RESET_BINDING(curwin);
  
--- 3231,3244 ----
  
        if ((eap->cmdidx == CMD_copen || eap->cmdidx == CMD_cwindow)
                && cmdmod.split == 0)
!           /* Create the new quickfix window at the very bottom, except when
             * :belowright or :aboveleft is used. */
            win_goto(lastwin);
!       /* Default is to open the window below the current window */
!       if (cmdmod.split == 0)
!           flags = WSP_BELOW;
!       flags |= WSP_NEWLOC;
!       if (win_split(height, flags) == FAIL)
            return;             /* not enough room for window */
        RESET_BINDING(curwin);
  
*** ../vim-8.0.1426/src/testdir/test_quickfix.vim       2017-12-21 
20:54:45.133204521 +0100
--- src/testdir/test_quickfix.vim       2017-12-26 13:50:10.096676893 +0100
***************
*** 3078,3080 ****
--- 3078,3107 ----
    augroup END
    enew | only
  endfunc
+ 
+ " Test for the position of the quickfix and location list window
+ func Test_qfwin_pos()
+   " Open two windows
+   new | only
+   new
+   cexpr ['F1:10:L10']
+   copen
+   " Quickfix window should be the bottom most window
+   call assert_equal(3, winnr())
+   close
+   " Open at the very top
+   wincmd t
+   topleft copen
+   call assert_equal(1, winnr())
+   close
+   " open left of the current window
+   wincmd t
+   below new
+   leftabove copen
+   call assert_equal(2, winnr())
+   close
+   " open right of the current window
+   rightbelow copen
+   call assert_equal(3, winnr())
+   close
+ endfunc
*** ../vim-8.0.1426/src/version.c       2017-12-25 14:29:11.487240231 +0100
--- src/version.c       2017-12-26 13:52:18.200046819 +0100
***************
*** 773,774 ****
--- 773,776 ----
  {   /* Add new patch number below this line */
+ /**/
+     1427,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
165. You have a web page burned into your glasses

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