Skip to content

Commit

Permalink
Handle commit set at the end of magit_default_sections
Browse files Browse the repository at this point in the history
  • Loading branch information
iaia committed Nov 6, 2017
1 parent 929d119 commit 76350ab
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion plugin/magit.vim
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,13 @@ endfunction
function! s:mg_get_commit_msg(...)
let commit_section_pat_start='^'.g:magit_sections.commit.'$'
" Get next section pattern with g:magit_default_sections order
let commit_section_pat_end='^'.g:magit_sections[g:magit_default_sections[match(g:magit_default_sections, 'commit')+1]].'$'
let commit_position = match(g:magit_default_sections, 'commit')
if ( commit_position + 1 == len(g:magit_default_sections) )
let commit_section_pat_end='\%$'
else
let commit_section_pat_end='^'.g:magit_sections[g:magit_default_sections[commit_position+1]].'$'
endif

let commit_jump_line = 2
let out_of_block = a:0 == 1 ? a:1 : 0
if ( out_of_block )
Expand Down

0 comments on commit 76350ab

Please sign in to comment.