diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-02-26 23:04:13 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-02-26 23:04:13 +0000 |
commit | 05159a0c6a27a030c8497c5cf836977090f9e75d (patch) | |
tree | 9ccc167cf3e830e5d01aff4555f99d854cbb623b /src/window.c | |
parent | 5313dcb75ac76501f23d21ac94efdbeeabc860bc (diff) | |
download | vim-git-05159a0c6a27a030c8497c5cf836977090f9e75d.tar.gz |
updated for version 7.0052v7.0052
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/window.c b/src/window.c index c96bb9755..7cd2f0224 100644 --- a/src/window.c +++ b/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 |