home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 6.1.063 < prev    next >
Encoding:
Internet Message Format  |  2002-05-11  |  2.8 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.063
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.1.063
  11. Problem:    Java indenting doesn't work properly.
  12. Solution:   Ignore comments when checking if the indent doesn't increase after
  13.         a "}".
  14. Files:        runtime/indent/java.vim
  15.  
  16.  
  17. *** ../vim61.062/runtime/indent/java.vim    Thu Feb 28 19:46:29 2002
  18. --- runtime/indent/java.vim    Sun Apr 21 13:58:18 2002
  19. ***************
  20. *** 1,7 ****
  21.   " Vim indent file
  22.   " Language:    Java
  23.   " Maintainer:    Bram Moolenaar <Bram@vim.org>
  24. ! " Last Change:    2002 Feb 28
  25.   
  26.   " Only load this indent file when no other was loaded.
  27.   if exists("b:did_indent")
  28. --- 1,7 ----
  29.   " Vim indent file
  30.   " Language:    Java
  31.   " Maintainer:    Bram Moolenaar <Bram@vim.org>
  32. ! " Last Change:    2002 Apr 21
  33.   
  34.   " Only load this indent file when no other was loaded.
  35.   if exists("b:did_indent")
  36. ***************
  37. *** 66,72 ****
  38.   
  39.     " Below a line starting with "}" never indent more.  Needed for a method
  40.     " below a method with an indented "throws" clause.
  41. !   let lnum = prevnonblank(v:lnum - 1)
  42.     if getline(lnum) =~ '^\s*}\s*\(//.*\|/\*.*\)\=$' && indent(lnum) < theIndent
  43.       let theIndent = indent(lnum)
  44.     endif
  45. --- 66,88 ----
  46.   
  47.     " Below a line starting with "}" never indent more.  Needed for a method
  48.     " below a method with an indented "throws" clause.
  49. !   " First ignore comment lines.
  50. !   let lnum = v:lnum - 1
  51. !   while lnum > 1
  52. !     let lnum = prevnonblank(lnum)
  53. !     if getline(lnum) =~ '\*/\s*$'
  54. !       while getline(lnum) !~ '/\*' && lnum > 1
  55. !     let lnum = lnum - 1
  56. !       endwhile
  57. !       if getline(lnum) =~ '^\s*/\*'
  58. !     let lnum = lnum - 1
  59. !       endif
  60. !     elseif getline(lnum) =~ '^\s*//'
  61. !       let lnum = lnum - 1
  62. !     else
  63. !       break
  64. !     endif
  65. !   endwhile
  66.     if getline(lnum) =~ '^\s*}\s*\(//.*\|/\*.*\)\=$' && indent(lnum) < theIndent
  67.       let theIndent = indent(lnum)
  68.     endif
  69. *** ../vim61.062/src/version.c    Sun May 12 14:36:14 2002
  70. --- src/version.c    Sun May 12 18:42:46 2002
  71. ***************
  72. *** 608,609 ****
  73. --- 608,611 ----
  74.   {   /* Add new patch number below this line */
  75. + /**/
  76. +     63,
  77.   /**/
  78.  
  79. -- 
  80. While it's true that many normal people whould prefer not to _date_ an
  81. engineer, most normal people harbor an intense desire to _mate_ with them,
  82. thus producing engineerlike children who will have high-paying jobs long
  83. before losing their virginity.
  84.                 (Scott Adams - The Dilbert principle)
  85.  
  86.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  87. ///   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   \\\
  88. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  89.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  90.