Commits

ZyX_I  committed 3be9487

Added eighth optional argument to commit.commit()

  • Participants
  • Parent commits f3b2b3a

Comments (0)

Files changed (2)

File autoload/aurum/commit.vim

 "▶1 
 scriptencoding utf-8
-execute frawor#Setup('1.3', {'@/resources': '0.0',
+execute frawor#Setup('1.4', {'@/resources': '0.0',
             \                '@/functions': '0.1',
             \                  '@/options': '0.0',
             \                       '@/os': '0.0',
         endif
     endif
 endfunction
-"▶1 commit :: repo, opts, files, status, types[, cmd[, bvarpart]] → + repo
+"▶1 commit :: repo, opts, files, status, types[, cmd[, bvarpart[, edit]]]
 let s:defdate=['strftime("%Y")',
             \  'strftime("%m")',
             \  'strftime("%d")',
         let date=join(dparts[:2], '-').' '.join(dparts[3:], ':')
     endif
     "▲2
-    if empty(message)
+    if empty(message) || (a:0>2 && a:3 isnot 0)
         call s:_r.run(((a:0 && a:1 isnot 0)? a:1 : 'silent new'),
                     \ 'commit', a:repo, user, date, cb, a:files)
         " Workaround problem with templates created on BufNewFile. Namely if you 
             call setline('.', split(g:AuPreviousCommitMessage, "\n", 1))
             call cursor(line('$'), col([line('$'), '$']))
             unlet g:AuPreviousRepoPath g:AuPreviousTip g:AuPreviousCommitMessage
+        elseif a:0>2 && a:3 isnot 0
+            call setline('.', split(message, "\n", 1))
+            call cursor(line('$'), col([line('$'), '$']))
         endif
         "▶2 Add comment
         let fmessage=[]

File doc/aurum.txt

          added |g:aurum_commitinfowincmd| option
     1.3: Added seventh optional argument to _r.commit.commit() and 
          |g:aurum_commitautoopendiff| option.
+    1.4: Added eighth optional argument to _r.commit.commit().
 @%aurum/annotate:
     1.0: Removed one argument to _r.annotate.setannbuf().
 @%aurum/cmdutils: