From c29414aaef2466f5cf7ade106c1b6a80695b7255 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Feb 12 2007 15:09:52 +0000 Subject: - patchlevel 192 - test fix for highlighting problems with curly brackets in #define (#203577) --- diff --git a/7.0.192 b/7.0.192 new file mode 100644 index 0000000..de0b001 --- /dev/null +++ b/7.0.192 @@ -0,0 +1,158 @@ +To: vim-dev@vim.org +Subject: patch 7.0.192 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.192 +Problem: When 'swapfile' is switched off in an empty file it is possible + that not all blocks are loaded into memory, causing ml_get errors + later. +Solution: Rename "dont_release" to "mf_dont_release" and also use it to + avoid using the cached line and locked block. +Files: src/globals.h, src/memfile.c, src/memline.c + + +*** ../vim-7.0.191/src/globals.h Tue Jan 9 15:15:36 2007 +--- src/globals.h Wed Feb 7 03:29:52 2007 +*************** +*** 554,559 **** +--- 554,563 ---- + EXTERN buf_T *firstbuf INIT(= NULL); /* first buffer */ + EXTERN buf_T *lastbuf INIT(= NULL); /* last buffer */ + EXTERN buf_T *curbuf INIT(= NULL); /* currently active buffer */ ++ ++ /* Flag that is set when switching off 'swapfile'. It means that all blocks ++ * are to be loaded into memory. Shouldn't be global... */ ++ EXTERN int mf_dont_release INIT(= FALSE); /* don't release blocks */ + + /* + * List of files being edited (global argument list). curwin->w_alist points +*** ../vim-7.0.191/src/memfile.c Tue Nov 7 18:02:19 2006 +--- src/memfile.c Wed Feb 7 03:22:11 2007 +*************** +*** 76,82 **** + #define MEMFILE_PAGE_SIZE 4096 /* default page size */ + + static long_u total_mem_used = 0; /* total memory used for memfiles */ +- static int dont_release = FALSE; /* don't release blocks */ + + static void mf_ins_hash __ARGS((memfile_T *, bhdr_T *)); + static void mf_rem_hash __ARGS((memfile_T *, bhdr_T *)); +--- 76,81 ---- +*************** +*** 279,288 **** + if (getlines) + { + /* get all blocks in memory by accessing all lines (clumsy!) */ +! dont_release = TRUE; + for (lnum = 1; lnum <= buf->b_ml.ml_line_count; ++lnum) + (void)ml_get_buf(buf, lnum, FALSE); +! dont_release = FALSE; + /* TODO: should check if all blocks are really in core */ + } + +--- 278,287 ---- + if (getlines) + { + /* get all blocks in memory by accessing all lines (clumsy!) */ +! mf_dont_release = TRUE; + for (lnum = 1; lnum <= buf->b_ml.ml_line_count; ++lnum) + (void)ml_get_buf(buf, lnum, FALSE); +! mf_dont_release = FALSE; + /* TODO: should check if all blocks are really in core */ + } + +*************** +*** 830,836 **** + buf_T *buf; + + /* don't release while in mf_close_file() */ +! if (dont_release) + return NULL; + + /* +--- 829,835 ---- + buf_T *buf; + + /* don't release while in mf_close_file() */ +! if (mf_dont_release) + return NULL; + + /* +*** ../vim-7.0.191/src/memline.c Tue Jan 9 15:15:36 2007 +--- src/memline.c Wed Feb 7 03:29:31 2007 +*************** +*** 2074,2081 **** + /* + * See if it is the same line as requested last time. + * Otherwise may need to flush last used line. + */ +! if (buf->b_ml.ml_line_lnum != lnum) + { + ml_flush_line(buf); + +--- 2074,2083 ---- + /* + * See if it is the same line as requested last time. + * Otherwise may need to flush last used line. ++ * Don't use the last used line when 'swapfile' is reset, need to load all ++ * blocks. + */ +! if (buf->b_ml.ml_line_lnum != lnum || mf_dont_release) + { + ml_flush_line(buf); + +*************** +*** 3200,3212 **** + * If not, flush and release the locked block. + * Don't do this for ML_INSERT_SAME, because the stack need to be updated. + * Don't do this for ML_FLUSH, because we want to flush the locked block. + */ + if (buf->b_ml.ml_locked) + { +! if (ML_SIMPLE(action) && buf->b_ml.ml_locked_low <= lnum +! && buf->b_ml.ml_locked_high >= lnum) + { +! /* remember to update pointer blocks and stack later */ + if (action == ML_INSERT) + { + ++(buf->b_ml.ml_locked_lineadd); +--- 3202,3217 ---- + * If not, flush and release the locked block. + * Don't do this for ML_INSERT_SAME, because the stack need to be updated. + * Don't do this for ML_FLUSH, because we want to flush the locked block. ++ * Don't do this when 'swapfile' is reset, we want to load all the blocks. + */ + if (buf->b_ml.ml_locked) + { +! if (ML_SIMPLE(action) +! && buf->b_ml.ml_locked_low <= lnum +! && buf->b_ml.ml_locked_high >= lnum +! && !mf_dont_release) + { +! /* remember to update pointer blocks and stack later */ + if (action == ML_INSERT) + { + ++(buf->b_ml.ml_locked_lineadd); +*** ../vim-7.0.191/src/version.c Sun Feb 4 02:59:04 2007 +--- src/version.c Wed Feb 7 03:40:28 2007 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 192, + /**/ + +-- +From "know your smileys": + %-) After staring at screen for 15 hours + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/README.patches b/README.patches index 94126b2..bea612f 100644 --- a/README.patches +++ b/README.patches @@ -221,3 +221,4 @@ Individual patches for Vim 7.0: 2290 7.0.189 translated message about finding matches is truncated 1778 7.0.190 "syntax spell default" results in an error message 10918 7.0.191 the items used by getqflist() and setqflist() don't match + 5114 7.0.192 ml_get errors when resetting 'swapfile' in empty file diff --git a/vim-7.0-bracket-203577.patch b/vim-7.0-bracket-203577.patch new file mode 100644 index 0000000..68fd968 --- /dev/null +++ b/vim-7.0-bracket-203577.patch @@ -0,0 +1,20 @@ +--- vim70/runtime/syntax/c.vim.bracket 2007-02-12 09:53:30.000000000 -0500 ++++ vim70/runtime/syntax/c.vim 2007-02-12 09:54:28.000000000 -0500 +@@ -64,6 +64,8 @@ + endif + endif + ++syntax region cBlock start="{" end="}" transparent fold ++ + "catch errors caused by wrong parenthesis and brackets + " also accept <% for {, %> for }, <: for [ and :> for ] (C99) + " But avoid matching <::. +@@ -148,8 +150,6 @@ + syntax match cCommentError display "\*/" + syntax match cCommentStartError display "/\*"me=e-1 contained + +-syntax region cBlock start="{" end="}" transparent fold +- + syn keyword cOperator sizeof + if exists("c_gnu") + syn keyword cStatement __asm__ diff --git a/vim.spec b/vim.spec index a1fc06c..0d2b3a9 100644 --- a/vim.spec +++ b/vim.spec @@ -14,13 +14,13 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim70%{?beta} -%define patchlevel 191 +%define patchlevel 192 Summary: The VIM editor URL: http://www.vim.org/ Name: vim Version: %{baseversion}.%{beta}%{patchlevel} -Release: 2%{?dist} +Release: 1%{?dist} License: GPL Group: Applications/Editors Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}%{?beta}%{?CVSDATE}.tar.bz2 @@ -239,6 +239,7 @@ Patch188: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.188 Patch189: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.189 Patch190: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.190 Patch191: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.191 +Patch192: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.192 Patch3000: vim-7.0-syntax.patch #Patch3001: vim-6.2-rh1.patch @@ -252,6 +253,7 @@ Patch3009: vim-7.0-warning.patch Patch3010: vim-7.0-syncolor.patch Patch3011: vim-7.0-vimspelltypo.patch Patch3012: vim-7.0-specedit.patch +Patch3013: vim-7.0-bracket-203577.patch # Patch3100: vim-selinux.patch Patch3101: vim-selinux2.patch @@ -589,7 +591,8 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch188 -p0 %patch189 -p0 %patch190 -p0 -%patch191 -p0 -b .191 +%patch191 -p0 +%patch192 -p0 # install spell files %if %{withvimspell} @@ -609,6 +612,7 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch3010 -p1 %patch3011 -p1 %patch3012 -p1 +%patch3013 -p1 %if %{WITH_SELINUX} %patch3100 -p1 @@ -962,6 +966,10 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Mon Feb 12 2007 Karsten Hopp 7.0.192-1 +- patchlevel 192 +- test fix for highlighting problems with curly brackets in #define (#203577) + * Tue Feb 06 2007 Karsten Hopp 7.0.191-2 - uses ncurses instead of ncursesw