mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
updated for version 7.0052
This commit is contained in:
36
src/window.c
36
src/window.c
@@ -74,6 +74,11 @@ static void win_new_height __ARGS((win_T *, int));
|
||||
|
||||
#define NOWIN (win_T *)-1 /* non-exisiting window */
|
||||
|
||||
#ifdef FEAT_WINDOWS
|
||||
static long p_ch_used = 1L; /* value of 'cmdheight' when frame
|
||||
size was set */
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_WINDOWS) || defined(PROTO)
|
||||
/*
|
||||
* all CTRL-W window commands are handled here, called from normal_cmd().
|
||||
@@ -498,6 +503,23 @@ do_window(nchar, Prenum, xchar)
|
||||
break;
|
||||
#endif
|
||||
|
||||
case K_KENTER:
|
||||
case CAR:
|
||||
#if defined(FEAT_QUICKFIX)
|
||||
/*
|
||||
* In a quickfix window a <CR> jumps to the error under the
|
||||
* cursor in a new window.
|
||||
*/
|
||||
if (bt_quickfix(curbuf))
|
||||
{
|
||||
sprintf((char *)cbuf, "split +%ldcc",
|
||||
(long)curwin->w_cursor.lnum);
|
||||
do_cmdline_cmd(cbuf);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
||||
/* CTRL-W g extended commands */
|
||||
case 'g':
|
||||
case Ctrl_G:
|
||||
@@ -2680,6 +2702,9 @@ win_alloc_first()
|
||||
topframe->fr_width = Columns;
|
||||
#endif
|
||||
topframe->fr_height = Rows - p_ch;
|
||||
#ifdef FEAT_WINDOWS
|
||||
p_ch_used = p_ch;
|
||||
#endif
|
||||
topframe->fr_win = curwin;
|
||||
curwin->w_frame = topframe;
|
||||
}
|
||||
@@ -3308,6 +3333,10 @@ shell_new_rows()
|
||||
win_new_height(firstwin, h);
|
||||
#endif
|
||||
compute_cmdrow();
|
||||
#ifdef FEAT_WINDOWS
|
||||
p_ch_used = p_ch;
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/* Disabled: don't want making the screen smaller make a window larger. */
|
||||
if (p_ea)
|
||||
@@ -4315,6 +4344,13 @@ command_height(old_p_ch)
|
||||
int h;
|
||||
frame_T *frp;
|
||||
|
||||
/* When passed a negative value use the value of p_ch that we remembered.
|
||||
* This is needed for when the GUI starts up, we can't be sure in what
|
||||
* order things happen. */
|
||||
if (old_p_ch < 0)
|
||||
old_p_ch = p_ch_used;
|
||||
p_ch_used = p_ch;
|
||||
|
||||
/* Find bottom frame with width of screen. */
|
||||
frp = lastwin->w_frame;
|
||||
# ifdef FEAT_VERTSPLIT
|
||||
|
Reference in New Issue
Block a user