To: vim-dev@vim.org Subject: Patch 6.2.129 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.129 Problem: When 'number' is set 'wrapmargin' does not work Vi-compatible. (Yasuhiro Matsumoto) Solution: Reduce the textwidth when 'number' is set. Also for 'foldcolumn' and similar things. Files: src/edit.c *** ../vim-6.2.128/src/edit.c Sun Oct 12 17:10:47 2003 --- src/edit.c Mon Oct 20 13:26:58 2003 *************** *** 4472,4478 **** --- 4472,4499 ---- textwidth = curbuf->b_p_tw; if (textwidth == 0 && curbuf->b_p_wm) + { + /* The width is the window width minus 'wrapmargin' minus all the + * things that add to the margin. */ textwidth = W_WIDTH(curwin) - curbuf->b_p_wm; + #ifdef FEAT_CMDWIN + if (cmdwin_type != 0) + textwidth -= 1; + #endif + #ifdef FEAT_FOLDING + textwidth -= curwin->w_p_fdc; + #endif + #ifdef FEAT_SIGNS + if (curwin->w_buffer->b_signlist != NULL + # ifdef FEAT_NETBEANS_INTG + || usingNetbeans + # endif + ) + textwidth -= 1; + #endif + if (curwin->w_p_nu) + textwidth -= 8; + } if (textwidth < 0) textwidth = 0; if (ff && textwidth == 0) *** ../vim-6.2.128/src/version.c Thu Oct 23 14:10:16 2003 --- src/version.c Sun Oct 26 19:55:54 2003 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 129, /**/ -- ARTHUR: Be quiet! DENNIS: Well you can't expect to wield supreme executive power just 'cause some watery tart threw a sword at you! ARTHUR: Shut up! DENNIS: I mean, if I went around sayin' I was an empereror just because some moistened bint had lobbed a scimitar at me they'd put me away! The Quest for the Holy Grail (Monty Python) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///