Commits

ZyX_I committed 3c78a55

@aurum/edit: Moved all *NoInsert events here, made them less restrictive

Comments (0)

Files changed (4)

plugin/aurum/annotate.vim

     else
         call setline('.', lines)
         setlocal readonly nomodifiable
-        augroup AuAnnotateNoInsert
-            autocmd InsertEnter <buffer> :call feedkeys("\e", 'n')
-        augroup END
     endif
     return bvar
 endfunction
-let s:_augroups+=['AuAnnotateNoInsert']
 "▶1 setannbuf
 function s:F.setannbuf(bvar, buf, annbuf)
     let a:bvar.annbuf=a:annbuf
             \'\vfile\s+type\s*\V""', 'file path',          ''),
             \'\vrev\s+type\s*\V""',  'rev '.s:_r.comp.rev, ''))
 "▶1 aurum://annotate
-call s:_f.newcommand({
-            \'function': s:F.setup,
-            \ 'arguments': 2,
-            \  'filetype': 'aurumannotate',})
+call s:_f.newcommand({'function': s:F.setup,
+            \        'arguments': 2,
+            \         'filetype': 'aurumannotate',})
 "▶1 Post resource
 call s:_f.postresource('annotate', {'setannbuf': s:F.setannbuf,
             \                        'foldopen': s:F.foldopen,})

plugin/aurum/edit.vim

     endif
     if !get(a:cdescr, 'modifiable', 0)
         setlocal nomodifiable readonly
+        augroup AurumNoInsert
+            autocmd! InsertEnter <buffer> : if !&modifiable
+                        \                 |     call feedkeys("\e", 'n')
+                        \                 | endif
+        augroup END
     endif
     file
 endfunction
+let s:_augroups+=['AurumNoInsert']
 "▶1 checkcmd :: command → _ + :throw?
 function s:F.checkcmd(command)
     if !has_key(s:commands, a:command)

plugin/aurum/log.vim

         if bvar.procinput==1 && getchar(1)
             let bvar.procinput=0
         endif
-        augroup AuLogNoInsert
-            autocmd InsertEnter <buffer> :call feedkeys("\e", "n")
-        augroup END
     endif
     let bvar.cw=s:_f.getoption('closewindow')
     let text=s:F.glog.graphlog(a:repo, opts, csiterfuncs, bvar, a:read)
     endif
     return bvar
 endfunction
-let s:_augroups+=['AuLogNoInsert']
 "▶1 syndef
 function s:F.syndef()
     let buf=+expand('<abuf>')
         execute line
     endfor
 endfunction
-augroup auLogSyntax
+augroup AuLogSyntax
     autocmd Syntax aurumlog :call s:F.syndef()
 augroup END
-let s:_augroups+=['auLogSyntax']
+let s:_augroups+=['AuLogSyntax']
 "▶1 logfunc
 function s:logfunc.function(repopath, opts)
     let opts=copy(a:opts)

plugin/aurum/status.vim

     else
         call setline('.', statlines)
         setlocal readonly nomodifiable
-        augroup AuStatusNoInsert
-            autocmd InsertEnter <buffer> :call feedkeys("\e", 'n')
-        augroup END
     endif
     return bvar
 endfunction
-let s:_augroups+=['AuStatusNoInsert']
 "▶1 statfunc
 let s:defcmd='silent botright new'
 function s:statfunc.function(repopath, opts)