4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: When 'foldcolumn' is equal to the window width and 'wrap' is on
12 Vim may crash. Disabling the vertical split feature breaks
13 compiling. (Peter Winters)
14 Solution: Check for zero room for wrapped text. Make compiling without
15 vertical splits possible.
16 Files: src/move.c, src/quickfix.c, src/screen.c, src/netbeans.c
19 *** ../vim-6.3.057/src/move.c Mon Dec 6 11:51:12 2004
20 --- src/move.c Thu Jan 13 19:16:32 2005
24 /* long line wrapping, adjust curwin->w_wrow */
25 if (curwin->w_p_wrap && col >= (colnr_T)W_WIDTH(curwin)
26 ! #ifdef FEAT_VERTSPLIT
27 ! && curwin->w_width != 0
31 col -= W_WIDTH(curwin);
32 col = col % (W_WIDTH(curwin) - off + curwin_col_off2());
35 /* long line wrapping, adjust curwin->w_wrow */
36 if (curwin->w_p_wrap && col >= (colnr_T)W_WIDTH(curwin)
37 ! && W_WIDTH(curwin) - off + curwin_col_off2() > 0)
39 col -= W_WIDTH(curwin);
40 col = col % (W_WIDTH(curwin) - off + curwin_col_off2());
41 *** ../vim-6.3.057/src/quickfix.c Wed Jun 9 14:56:26 2004
42 --- src/quickfix.c Thu Jan 13 19:19:21 2005
46 else if (buf != curbuf)
47 set_curbuf(buf, DOBUF_GOTO);
49 + #ifdef FEAT_VERTSPLIT
50 /* Only set the height when there is no window to the side. */
51 if (curwin->w_width == Columns)
53 win_setheight(height);
54 curwin->w_p_wfh = TRUE; /* set 'winfixheight' */
56 *** ../vim-6.3.057/src/screen.c Thu Dec 16 12:48:12 2004
57 --- src/screen.c Thu Jan 13 19:21:40 2005
62 /* draw the fold column at the right */
63 ! if (n > wp->w_width)
65 screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
66 W_ENDCOL(wp) - n, (int)W_ENDCOL(wp),
67 ' ', ' ', hl_attr(HLF_FC));
71 /* draw the fold column at the right */
72 ! if (n > W_WIDTH(wp))
74 screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
75 W_ENDCOL(wp) - n, (int)W_ENDCOL(wp),
76 ' ', ' ', hl_attr(HLF_FC));
81 /* draw the sign column left of the fold column */
82 ! if (nn > wp->w_width)
84 screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
85 W_ENDCOL(wp) - nn, (int)W_ENDCOL(wp) - n,
86 ' ', ' ', hl_attr(HLF_SC));
90 /* draw the sign column left of the fold column */
91 ! if (nn > W_WIDTH(wp))
93 screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
94 W_ENDCOL(wp) - nn, (int)W_ENDCOL(wp) - n,
95 ' ', ' ', hl_attr(HLF_SC));
96 *** ../vim-6.3.057/src/netbeans.c Wed Jun 9 14:56:26 2004
97 --- src/netbeans.c Thu Jan 13 19:22:30 2005
101 if (bufno >= 0 && curwin != NULL && curwin->w_buffer == curbuf)
103 ! int col = mouse_col - curwin->w_wincol - (curwin->w_p_nu ? 9 : 1);
104 long off = pos2off(curbuf, &curwin->w_cursor);
106 /* sync the cursor position */
109 if (bufno >= 0 && curwin != NULL && curwin->w_buffer == curbuf)
111 ! int col = mouse_col - W_WINCOL(curwin) - (curwin->w_p_nu ? 9 : 1);
112 long off = pos2off(curbuf, &curwin->w_cursor);
114 /* sync the cursor position */
115 *** ../vim-6.3.057/src/version.c Thu Jan 13 17:38:30 2005
116 --- src/version.c Tue Jan 18 10:49:55 2005
120 { /* Add new patch number below this line */
126 TALL KNIGHT: Firstly. You must get us another shrubbery!
127 OTHER KNIGHTS: More shrubberies! More shrubberies for the ex-Knights of Ni!
128 ARTHUR: Not another shrubbery -
129 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
131 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
132 /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
133 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
134 \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///