To: vim-dev@vim.org Subject: Patch 6.1.161 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.161 (depends on 6.1.158) Problem: Warning for signed/unsigned compare. Can set 'siso' to a negative value. (Mike Williams) Solution: Add a typecast. Add a check for 'siso' being negative. Files: src/normal.c, src/option.c *** ../vim61.160/src/normal.c Sun Aug 18 17:18:25 2002 --- src/normal.c Mon Aug 19 22:42:24 2002 *************** *** 4162,4168 **** else #endif getvcol(curwin, &curwin->w_cursor, &col, NULL, NULL); ! if (col > p_siso) col -= p_siso; else col = 0; --- 4162,4168 ---- else #endif getvcol(curwin, &curwin->w_cursor, &col, NULL, NULL); ! if ((long)col > p_siso) col -= p_siso; else col = 0; *** ../vim61.160/src/option.c Sun Aug 18 15:56:14 2002 --- src/option.c Mon Aug 19 22:45:10 2002 *************** *** 6286,6291 **** --- 6294,6304 ---- errmsg = e_scroll; p_so = 0; } + if (p_siso < 0 && full_screen) + { + errmsg = e_positive; + p_siso = 0; + } #ifdef FEAT_CMDWIN if (p_cwh < 1) { *** ../vim61.160/src/version.c Thu Aug 22 20:30:17 2002 --- src/version.c Thu Aug 22 20:32:36 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 161, /**/ -- GOD: That is your purpose Arthur ... the Quest for the Holy Grail ... "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///