Closed punassuming closed 9 years ago
On Fri, Mar 2, 2012 at 12:31 PM, Rich Alesi reply@reply.github.com wrote:
-- Commit Summary --
- Allow spaces between headings
-- File Changes --
M ftplugin/org.vim (16856)
-- Patch Links --
https://github.com/hsitz/VimOrganizer/pull/31.patch https://github.com/hsitz/VimOrganizer/pull/31.diff
Rich -- Thanks a lot, that functionality would be good to have, but I may change it to be an option (or have option not to have it). Unfortunately, the diff file for your changes seems to have flagged every line and it's hard for me to see what changes are. Are changes simple enough to give me a quick look via copy and past?
-- Herb
That teaches me to not try the edit and fork functionality within Github. From now on, I'll just make my own branch for pull requests
Starts at line 1314
if l:lastline != 0
let l:lastline -= 1
+ while getline(l:lastline) =~ '^$'
+ let l:lastline -= 1
+ endwhile
else
let l:lastline = line("$")
endif
return l:lastline
On Fri, Mar 2, 2012 at 1:51 PM, Rich Alesi reply@reply.github.com wrote:
That teaches me to not try the edit and fork functionality within Github. From now on, I'll just make my own branch for pull requests
I think it must be
Starts at line 1314
if l:lastline != 0 let l:lastline -= 1 + while getline(l:lastline) =~ '^$' + let l:lastline -= 1 + endwhile else let l:lastline = line("$") endif return l:lastline
My first thought is this will cause issues with the section-moving commands (e.g.., <c-a-[up-down-left-right]>) which depend on same function to find end of block to move. I assume we don't want to leave stay blank lines when moving sections. Hopefully that's only issue and further changes to accommodate that are simple. . .
-- Herb
I sometimes like to have spaces in between headings to make the structure more obvious. The current implementation of s:OrgSubtreeLastLine_l will search for the next star at the same level and subtract one. However, with this algorithm, you get this problem:
This fix skips over all blank lines to give the desired behavior: