Commits

ZyX_I  committed ff59f29

Move fullundo option to undo.vim

  • Participants
  • Parent commits 12e7cb9

Comments (0)

Files changed (3)

File autoload/aurum/record.vim

             \         '@%aurum/tabutils': '0.0',
             \        '@%aurum/lineutils': '0.0',
             \             '@%aurum/edit': '1.5',
-            \             '@%aurum/undo': '0.0',
+            \             '@%aurum/undo': '1.0',
             \          '@%aurum/bufvars': '0.0',})
 let s:_options={
             \'recheight':    {'default': 0,
             \                  'filter': '(if type "" earg _  range 0 inf)'},
-            \'fullundo':     {'default': 1,
-            \                  'filter': 'bool'},
             \'recautowrite': {'default': 1,
             \                  'filter': 'bool'},
         \}
     let bvar.resetlines=s:F.resetlines
     let bvar.pulllines=s:F.pulllines
     let bvar.procundoleaf=s:F.procundoleaf
-    call s:_r.undo.setup(bvar, s:_f.getoption('fullundo'))
+    call s:_r.undo.setup(bvar)
     setglobal noautowrite noautowriteall noautoread
     setlocal noreadonly buftype=acwrite
     augroup AuRecordVimLeave

File autoload/aurum/undo.vim

 "▶1 
 scriptencoding utf-8
-execute frawor#Setup('0.0', {'@/resources': '0.0'})
+execute frawor#Setup('1.0', {'@/resources': '0.0',
+            \                  '@/options': '0.0',})
 let s:_messages={
             \'noutree': 'No such item in saved undo tree. '.
             \           'If you can reproduce this error file a bug report',
         \}
 let s:r={}
 let s:hasundo=exists('*undotree')
+let s:_options={
+            \'fullundo':     {'default': 1,
+            \                  'filter': 'bool'},
+        \}
 "▶1 curundo :: () → UInt
 if s:hasundo
     function s:F.curundo()
     endfunction
 endif
 "▶1 r.setup
-function s:r.setup(bvar, undo_full)
+function s:r.setup(bvar)
     let a:bvar.undo_start=s:F.curundo()
     let a:bvar.undo_ct=b:changedtick
-    let a:bvar.undo_full=(s:hasundo && a:undo_full)
+    let a:bvar.undo_full=(s:hasundo && s:_f.getoption('fullundo'))
     if a:bvar.undo_full
         let a:bvar.undo_tree={a:bvar.undo_start : {}}
     endif

File doc/aurum.txt

 @%aurum/record:
     0.1: Added |:AuRecord| amend.
     0.2: Officially added |g:aurum_fullundo|, added |g:aurum_recautowrite|.
+@%aurum/undo:
+    1.0: Moved |g:aurum_fullundo| definition here.
 
 vim: ft=help:tw=78