[Vimoutliner] patch: allow progress items with no children
Noel Henson
noel at noels-lab.com
Sun Jun 10 19:48:42 EDT 2007
Scott,
Thanks! I've been meaning to get to that. Been bogged down with work. I'll
patch mine and test it. If it works as advertised, I'll include it in the
next release.
Noel
On Sunday 10 June 2007, Scott Scriven wrote:
> Hi, here's a small patch to fix something which has been bugging
> me. It allows you to use checkbox items with a percent but no
> children. I often want to do this, and get annoyed when VO
> resets all my childless percents back to 0%.
>
> I've never done any vim scripting before, so I apologize if this
> is longer than necessary.
>
> As a side note, I was also rather tempted to fix all the
> tab-vs-space issues in that file... It appears that the author
> used a tabstop of 3 spaces, but did not consistently use tabs...
> or even a consistent indent width. So, the indentation is all
> messed up.
>
> --- vo_checkbox.vim.orig 2007-06-10 16:43:23.271346000 -0600
> +++ vo_checkbox.vim 2007-06-10 17:31:11.336096500 -0600
> @@ -269,9 +269,15 @@
> let l:i = l:i+1
> endwhile
> let l:proportion=0
> + let mbegin=match(getline(a:line), " [0-9]*%")
> + if mbegin
> + let mend=matchend(getline(a:line), " [0-9]*%")
> + let l:proportion=getline(a:line)[mbegin+1 : mend-1]
> + let l:proportion=str2nr(l:proportion)
> + endif
> if l:count>0
> let l:proportion = ((l:done * 100)/l:count)/100
> - else
> + elseif ! l:proportion
> if match(getline(a:line),"\\[X\\]") != -1
> let l:proportion = 100
> else
>
>
>
> -- Scott
> _______________________________________________
> VimOutliner mailing list
> VimOutliner at vimoutliner.org
> http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
--
------------------------------------------------------------------
Noel Henson
www.noels-lab.com Chips, firmware and embedded systems
www.vimoutliner.org Work fast. Think well.
More information about the VimOutliner
mailing list