comparison src/quickfix.c @ 13105:bfa7f5b23c53 v8.0.1427

patch 8.0.1427: the :leftabove modifier doesn't work for :copen commit https://github.com/vim/vim/commit/de04654ddc865af94ef04b1738b335a924be7923 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Dec 26 13:53:11 2017 +0100 patch 8.0.1427: the :leftabove modifier doesn't work for :copen Problem: The :leftabove modifier doesn't work for :copen. Solution: Respect the split modifier. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/2496)
author Christian Brabandt <cb@256bit.org>
date Tue, 26 Dec 2017 14:00:05 +0100
parents a0c6910e7fa4
children 9812a9ca3ab2
comparison
equal deleted inserted replaced
13104:99199df277c0 13105:bfa7f5b23c53
3220 win_setheight(height); 3220 win_setheight(height);
3221 } 3221 }
3222 } 3222 }
3223 else 3223 else
3224 { 3224 {
3225 int flags = 0;
3226
3225 qf_buf = qf_find_buf(qi); 3227 qf_buf = qf_find_buf(qi);
3226 3228
3227 /* The current window becomes the previous window afterwards. */ 3229 /* The current window becomes the previous window afterwards. */
3228 win = curwin; 3230 win = curwin;
3229 3231
3230 if ((eap->cmdidx == CMD_copen || eap->cmdidx == CMD_cwindow) 3232 if ((eap->cmdidx == CMD_copen || eap->cmdidx == CMD_cwindow)
3231 && cmdmod.split == 0) 3233 && cmdmod.split == 0)
3232 /* Create the new window at the very bottom, except when 3234 /* Create the new quickfix window at the very bottom, except when
3233 * :belowright or :aboveleft is used. */ 3235 * :belowright or :aboveleft is used. */
3234 win_goto(lastwin); 3236 win_goto(lastwin);
3235 if (win_split(height, WSP_BELOW | WSP_NEWLOC) == FAIL) 3237 /* Default is to open the window below the current window */
3238 if (cmdmod.split == 0)
3239 flags = WSP_BELOW;
3240 flags |= WSP_NEWLOC;
3241 if (win_split(height, flags) == FAIL)
3236 return; /* not enough room for window */ 3242 return; /* not enough room for window */
3237 RESET_BINDING(curwin); 3243 RESET_BINDING(curwin);
3238 3244
3239 if (eap->cmdidx == CMD_lopen || eap->cmdidx == CMD_lwindow) 3245 if (eap->cmdidx == CMD_lopen || eap->cmdidx == CMD_lwindow)
3240 { 3246 {