Mirror of the Vim source from https://github.com/vim/vim
リビジョン | 10a1b67c0885aabdac7c76a96169cd9e36414428 (tree) |
---|---|
日時 | 2007-08-12 23:55:56 |
作者 | vimboss |
コミッター | vimboss |
updated for version 7.1-068
@@ -1,4 +1,4 @@ | ||
1 | -*options.txt* For Vim version 7.1. Last change: 2007 May 11 | |
1 | +*options.txt* For Vim version 7.1. Last change: 2007 Aug 10 | |
2 | 2 | |
3 | 3 | |
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -2415,8 +2415,8 @@ | ||
2415 | 2415 | When mixing vertically and horizontally split windows, a minimal size |
2416 | 2416 | is computed and some windows may be larger if there is room. The |
2417 | 2417 | 'eadirection' option tells in which direction the size is affected. |
2418 | - Changing the height of a window can be avoided by setting | |
2419 | - 'winfixheight'. | |
2418 | + Changing the height and width of a window can be avoided by setting | |
2419 | + 'winfixheight' and 'winfixwidth', respectively. | |
2420 | 2420 | |
2421 | 2421 | *'equalprg'* *'ep'* |
2422 | 2422 | 'equalprg' 'ep' string (default "") |
@@ -132,7 +132,8 @@ | ||
132 | 132 | the same file. Make new window N high (default is to use half |
133 | 133 | the height of the current window). Reduces the current window |
134 | 134 | height to create room (and others, if the 'equalalways' option |
135 | - is set and 'eadirection' isn't "hor"). | |
135 | + is set, 'eadirection' isn't "hor", and one of them is higher | |
136 | + than the current or the new window). | |
136 | 137 | Note: CTRL-S does not work on all terminals and might block |
137 | 138 | further input, use CTRL-Q to get going again. |
138 | 139 | Also see |++opt| and |+cmd|. |
@@ -140,9 +141,13 @@ | ||
140 | 141 | CTRL-W CTRL-V *CTRL-W_CTRL-V* |
141 | 142 | CTRL-W v *CTRL-W_v* |
142 | 143 | :[N]vs[plit] [++opt] [+cmd] [file] *:vs* *:vsplit* |
143 | - Like |:split|, but split vertically. If 'equalalways' is set | |
144 | - and 'eadirection' isn't "ver" the windows will be spread out | |
145 | - horizontally, unless a width was specified. | |
144 | + Like |:split|, but split vertically. The windows will be | |
145 | + spread out horizontally if | |
146 | + 1. a width was not specified, | |
147 | + 2. 'equalalways' is set, | |
148 | + 3. 'eadirection' isn't "ver", and | |
149 | + 4. one of the other windows are wider than the current or new | |
150 | + window. | |
146 | 151 | Note: In other places CTRL-Q does the same as CTRL-V, but here |
147 | 152 | it doesn't! |
148 | 153 |
@@ -667,6 +667,8 @@ | ||
667 | 667 | static int included_patches[] = |
668 | 668 | { /* Add new patch number below this line */ |
669 | 669 | /**/ |
670 | + 68, | |
671 | +/**/ | |
670 | 672 | 67, |
671 | 673 | /**/ |
672 | 674 | 66, |
@@ -733,7 +733,6 @@ | ||
733 | 733 | if (flags & WSP_VERT) |
734 | 734 | { |
735 | 735 | layout = FR_ROW; |
736 | - do_equal = (p_ea && new_size == 0 && *p_ead != 'v'); | |
737 | 736 | |
738 | 737 | /* |
739 | 738 | * Check if we are able to split the current window and compute its |
@@ -770,16 +769,31 @@ | ||
770 | 769 | * instead, if possible. */ |
771 | 770 | if (oldwin->w_p_wfw) |
772 | 771 | win_setwidth_win(oldwin->w_width + new_size, oldwin); |
772 | + | |
773 | + /* Only make all windows the same width if one of them (except oldwin) | |
774 | + * is wider than one of the split windows. */ | |
775 | + if (!do_equal && p_ea && size == 0 && *p_ead != 'v' | |
776 | + && oldwin->w_frame->fr_parent != NULL) | |
777 | + { | |
778 | + frp = oldwin->w_frame->fr_parent->fr_child; | |
779 | + while (frp != NULL) | |
780 | + { | |
781 | + if (frp->fr_win != oldwin && frp->fr_win != NULL | |
782 | + && (frp->fr_win->w_width > new_size | |
783 | + || frp->fr_win->w_width > oldwin->w_width | |
784 | + - new_size - STATUS_HEIGHT)) | |
785 | + { | |
786 | + do_equal = TRUE; | |
787 | + break; | |
788 | + } | |
789 | + frp = frp->fr_next; | |
790 | + } | |
791 | + } | |
773 | 792 | } |
774 | 793 | else |
775 | 794 | #endif |
776 | 795 | { |
777 | 796 | layout = FR_COL; |
778 | - do_equal = (p_ea && new_size == 0 | |
779 | -#ifdef FEAT_VERTSPLIT | |
780 | - && *p_ead != 'h' | |
781 | -#endif | |
782 | - ); | |
783 | 797 | |
784 | 798 | /* |
785 | 799 | * Check if we are able to split the current window and compute its |
@@ -832,6 +846,29 @@ | ||
832 | 846 | if (need_status) |
833 | 847 | oldwin_height -= STATUS_HEIGHT; |
834 | 848 | } |
849 | + | |
850 | + /* Only make all windows the same height if one of them (except oldwin) | |
851 | + * is higher than one of the split windows. */ | |
852 | + if (!do_equal && p_ea && size == 0 | |
853 | +#ifdef FEAT_VERTSPLIT | |
854 | + && *p_ead != 'h' | |
855 | +#endif | |
856 | + && oldwin->w_frame->fr_parent != NULL) | |
857 | + { | |
858 | + frp = oldwin->w_frame->fr_parent->fr_child; | |
859 | + while (frp != NULL) | |
860 | + { | |
861 | + if (frp->fr_win != oldwin && frp->fr_win != NULL | |
862 | + && (frp->fr_win->w_height > new_size | |
863 | + || frp->fr_win->w_height > oldwin_height - new_size | |
864 | + - STATUS_HEIGHT)) | |
865 | + { | |
866 | + do_equal = TRUE; | |
867 | + break; | |
868 | + } | |
869 | + frp = frp->fr_next; | |
870 | + } | |
871 | + } | |
835 | 872 | } |
836 | 873 | |
837 | 874 | /* |