comparison src/window.c @ 170:8c60f65311fa v7.0052

updated for version 7.0052
author vimboss
date Sat, 26 Feb 2005 23:04:13 +0000
parents e9d287a403c4
children 7e70fc748752
comparison
equal deleted inserted replaced
169:0e902b8f511f 170:8c60f65311fa
71 71
72 #define URL_SLASH 1 /* path_is_url() has found "://" */ 72 #define URL_SLASH 1 /* path_is_url() has found "://" */
73 #define URL_BACKSLASH 2 /* path_is_url() has found ":\\" */ 73 #define URL_BACKSLASH 2 /* path_is_url() has found ":\\" */
74 74
75 #define NOWIN (win_T *)-1 /* non-exisiting window */ 75 #define NOWIN (win_T *)-1 /* non-exisiting window */
76
77 #ifdef FEAT_WINDOWS
78 static long p_ch_used = 1L; /* value of 'cmdheight' when frame
79 size was set */
80 #endif
76 81
77 #if defined(FEAT_WINDOWS) || defined(PROTO) 82 #if defined(FEAT_WINDOWS) || defined(PROTO)
78 /* 83 /*
79 * all CTRL-W window commands are handled here, called from normal_cmd(). 84 * all CTRL-W window commands are handled here, called from normal_cmd().
80 */ 85 */
495 Prenum == 0 ? TRUE : FALSE, type, 500 Prenum == 0 ? TRUE : FALSE, type,
496 Prenum1, ACTION_SPLIT, (linenr_T)1, (linenr_T)MAXLNUM); 501 Prenum1, ACTION_SPLIT, (linenr_T)1, (linenr_T)MAXLNUM);
497 curwin->w_set_curswant = TRUE; 502 curwin->w_set_curswant = TRUE;
498 break; 503 break;
499 #endif 504 #endif
505
506 case K_KENTER:
507 case CAR:
508 #if defined(FEAT_QUICKFIX)
509 /*
510 * In a quickfix window a <CR> jumps to the error under the
511 * cursor in a new window.
512 */
513 if (bt_quickfix(curbuf))
514 {
515 sprintf((char *)cbuf, "split +%ldcc",
516 (long)curwin->w_cursor.lnum);
517 do_cmdline_cmd(cbuf);
518 }
519 #endif
520 break;
521
500 522
501 /* CTRL-W g extended commands */ 523 /* CTRL-W g extended commands */
502 case 'g': 524 case 'g':
503 case Ctrl_G: 525 case Ctrl_G:
504 CHECK_CMDWIN 526 CHECK_CMDWIN
2678 topframe->fr_layout = FR_LEAF; 2700 topframe->fr_layout = FR_LEAF;
2679 #ifdef FEAT_VERTSPLIT 2701 #ifdef FEAT_VERTSPLIT
2680 topframe->fr_width = Columns; 2702 topframe->fr_width = Columns;
2681 #endif 2703 #endif
2682 topframe->fr_height = Rows - p_ch; 2704 topframe->fr_height = Rows - p_ch;
2705 #ifdef FEAT_WINDOWS
2706 p_ch_used = p_ch;
2707 #endif
2683 topframe->fr_win = curwin; 2708 topframe->fr_win = curwin;
2684 curwin->w_frame = topframe; 2709 curwin->w_frame = topframe;
2685 } 2710 }
2686 2711
2687 #if defined(FEAT_WINDOWS) || defined(PROTO) 2712 #if defined(FEAT_WINDOWS) || defined(PROTO)
3306 if (h < 1) 3331 if (h < 1)
3307 h = 1; 3332 h = 1;
3308 win_new_height(firstwin, h); 3333 win_new_height(firstwin, h);
3309 #endif 3334 #endif
3310 compute_cmdrow(); 3335 compute_cmdrow();
3336 #ifdef FEAT_WINDOWS
3337 p_ch_used = p_ch;
3338 #endif
3339
3311 #if 0 3340 #if 0
3312 /* Disabled: don't want making the screen smaller make a window larger. */ 3341 /* Disabled: don't want making the screen smaller make a window larger. */
3313 if (p_ea) 3342 if (p_ea)
3314 win_equal(curwin, FALSE, 'v'); 3343 win_equal(curwin, FALSE, 'v');
3315 #endif 3344 #endif
4313 { 4342 {
4314 #ifdef FEAT_WINDOWS 4343 #ifdef FEAT_WINDOWS
4315 int h; 4344 int h;
4316 frame_T *frp; 4345 frame_T *frp;
4317 4346
4347 /* When passed a negative value use the value of p_ch that we remembered.
4348 * This is needed for when the GUI starts up, we can't be sure in what
4349 * order things happen. */
4350 if (old_p_ch < 0)
4351 old_p_ch = p_ch_used;
4352 p_ch_used = p_ch;
4353
4318 /* Find bottom frame with width of screen. */ 4354 /* Find bottom frame with width of screen. */
4319 frp = lastwin->w_frame; 4355 frp = lastwin->w_frame;
4320 # ifdef FEAT_VERTSPLIT 4356 # ifdef FEAT_VERTSPLIT
4321 while (frp->fr_width != Columns && frp->fr_parent != NULL) 4357 while (frp->fr_width != Columns && frp->fr_parent != NULL)
4322 frp = frp->fr_parent; 4358 frp = frp->fr_parent;