Package: vim-runtime Version: 1:7.1-000+1 Severity: normal Tags: patch The current ruby indenting code incorrectly identifies any string ending with the substring for as the keyword for, resulting in the following indenting:
response_for(:show) do |format| format.html end and: response_fr(:show) do |format| format.html end Similar problems exist with while and until. The attached patch fixes this bug. -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: powerpc (ppc) Kernel: Linux 2.6.21-1-powerpc Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash vim-runtime depends on no packages. Versions of packages vim-runtime recommends: ii vim-full 1:7.1-000+1 Vi IMproved - enhanced vi editor - -- no debconf information
--- ruby.vim.orig 2007-06-30 20:33:14.000000000 +0200 +++ ruby.vim 2007-06-30 20:33:22.000000000 +0200 @@ -78,7 +78,7 @@ " Expression used for searchpair() call for finding match for 'end' keyword. let s:end_skip_expr = s:skip_expr . \ ' || (expand("<cword>") == "do"' . - \ ' && getline(".") =~ "^\\s*\\<while\\|until\\|for\\>")' + \ ' && getline(".") =~ "^\\s*\\<\\(while\\|until\\|for\\)\\>")' " Regex that defines continuation lines, not including (, {, or [. let s:continuation_regex = '\%([\\*+/.,=:-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$'