To: vim-dev@vim.org Subject: Patch 6.3b.025 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.3b.025 Problem: Percentage in ruler isn't updated when a line is deleted. (Jens Paulus) Solution: Check for a change in line count when deciding to update the ruler. Files: src/screen.c, src/structs.h *** ../vim-6.3b.024/src/screen.c Sun May 16 22:38:45 2004 --- src/screen.c Wed Jun 2 12:08:27 2004 *************** *** 8307,8312 **** --- 8307,8313 ---- || wp->w_cursor.coladd != wp->w_ru_cursor.coladd #endif || wp->w_topline != wp->w_ru_topline + || wp->w_buffer->b_ml.ml_line_count != wp->w_ru_line_count #ifdef FEAT_DIFF || wp->w_topfill != wp->w_ru_topfill #endif *************** *** 8423,8428 **** --- 8424,8430 ---- wp->w_ru_virtcol = wp->w_virtcol; wp->w_ru_empty = empty_line; wp->w_ru_topline = wp->w_topline; + wp->w_ru_line_count = wp->w_buffer->b_ml.ml_line_count; #ifdef FEAT_DIFF wp->w_ru_topfill = wp->w_topfill; #endif *** ../vim-6.3b.024/src/structs.h Sun May 16 22:38:45 2004 --- src/structs.h Wed Jun 2 12:09:24 2004 *************** *** 1483,1488 **** --- 1483,1489 ---- pos_T w_ru_cursor; /* cursor position shown in ruler */ colnr_T w_ru_virtcol; /* virtcol shown in ruler */ linenr_T w_ru_topline; /* topline shown in ruler */ + linenr_T w_ru_line_count; /* line count used for ruler */ # ifdef FEAT_DIFF int w_ru_topfill; /* topfill shown in ruler */ # endif *** ../vim-6.3b.024/src/version.c Wed Jun 2 11:18:15 2004 --- src/version.c Wed Jun 2 12:12:16 2004 *************** *** 643,644 **** --- 643,646 ---- { /* Add new patch number below this line */ + /**/ + 25, /**/ -- In many of the more relaxed civilizations on the Outer Eastern Rim of the Galaxy, "The Hitchhiker's Guide to the Galaxy" has already supplanted the great "Encyclopedia Galactica" as the standard repository of all knowledge and wisdom, for though it has many omissions and contains much that is apocryphal, or at least wildly inaccurate, it scores over the older, more pedestrian work in two important respects. First, it is slightly cheaper; and second, it has the words "DON'T PANIC" inscribed in large friendly letters on its cover. -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///