Mercurial > vim
comparison src/window.c @ 1354:10a1b67c0885 v7.1.068
updated for version 7.1-068
author | vimboss |
---|---|
date | Sun, 12 Aug 2007 14:55:56 +0000 |
parents | c649cc22da98 |
children | bdcfe793d49f |
comparison
equal
deleted
inserted
replaced
1353:87401adbf5fc | 1354:10a1b67c0885 |
---|---|
731 | 731 |
732 #ifdef FEAT_VERTSPLIT | 732 #ifdef FEAT_VERTSPLIT |
733 if (flags & WSP_VERT) | 733 if (flags & WSP_VERT) |
734 { | 734 { |
735 layout = FR_ROW; | 735 layout = FR_ROW; |
736 do_equal = (p_ea && new_size == 0 && *p_ead != 'v'); | |
737 | 736 |
738 /* | 737 /* |
739 * Check if we are able to split the current window and compute its | 738 * Check if we are able to split the current window and compute its |
740 * width. | 739 * width. |
741 */ | 740 */ |
768 /* We don't like to take lines for the new window from a | 767 /* We don't like to take lines for the new window from a |
769 * 'winfixwidth' window. Take them from a window to the left or right | 768 * 'winfixwidth' window. Take them from a window to the left or right |
770 * instead, if possible. */ | 769 * instead, if possible. */ |
771 if (oldwin->w_p_wfw) | 770 if (oldwin->w_p_wfw) |
772 win_setwidth_win(oldwin->w_width + new_size, oldwin); | 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 else | 793 else |
775 #endif | 794 #endif |
776 { | 795 { |
777 layout = FR_COL; | 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 * Check if we are able to split the current window and compute its | 799 * Check if we are able to split the current window and compute its |
786 * height. | 800 * height. |
787 */ | 801 */ |
829 win_setheight_win(oldwin->w_height + new_size + STATUS_HEIGHT, | 843 win_setheight_win(oldwin->w_height + new_size + STATUS_HEIGHT, |
830 oldwin); | 844 oldwin); |
831 oldwin_height = oldwin->w_height; | 845 oldwin_height = oldwin->w_height; |
832 if (need_status) | 846 if (need_status) |
833 oldwin_height -= STATUS_HEIGHT; | 847 oldwin_height -= STATUS_HEIGHT; |
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 } | |
834 } | 871 } |
835 } | 872 } |
836 | 873 |
837 /* | 874 /* |
838 * allocate new window structure and link it in the window list | 875 * allocate new window structure and link it in the window list |