Source

aurum / autoload / aurum / record.vim

Diff from to

autoload/aurum/record.vim

         call repo.functions.strip(repo)
     endif
     call map(files, 'repo.functions.reltorepo(repo, v:val)')
-    tabnew
-    setlocal bufhidden=wipe
-    let t:aurum_tabid='AuRecordTab'
-    call s:_r.tabutils.settoplayout(s:layout)
     let sopts={'record': 1}
     if !empty(files)
         let sopts.files=files
     endif
-    call s:_r.run('silent botright '.s:F.getswheight().'split', 'status',
-                \ repo, sopts)
-    setlocal bufhidden=wipe
-    let w:aurum_winid='AuRecordStatus'
+    call s:_f.tab.create(s:layoutname, s:_r.run, ['status', repo, sopts])
     setlocal nomodifiable
     call s:_f.mapgroup.map('AuRecord', bufnr('%'))
     let bvar=s:_r.bufvars[bufnr('%')]
         endif
     endif
 endfunction
+"▶1 tabunload
+function s:F.tabunload()
+    let [lwnr, rwnr, swnr]=s:F.getwnrs()
+    execute swnr.'wincmd w'
+    let bvar=s:_r.bufvars[bufnr('%')]
+    return s:F.unload(bvar)
+endfunction
 "▶1 unload
 function s:F.unload(bvar)
     let sbvar=get(a:bvar, 'sbvar', a:bvar)
     augroup END
 endfunction
 "▶1 getwnrs
-let s:layout={
+function s:F.getwnrs()
+    return s:_f.tab.getwnrs(s:layoutname)
+endfunction
+"▶1 register layout
+let s:layoutname='AuRecordTab'
+call s:_f.tab.new(s:layoutname, {
             \   'top': ['AuRecordLeft', 'AuRecordRight'],
             \'bottom': 'AuRecordStatus',
-            \'bottomheightfun': s:F.getswheight,
-        \}
-function s:F.getwnrs()
-    return s:_r.tabutils.getwnrs(s:layout)
-endfunction
+        \}, s:F.getswheight, s:F.tabunload)
 "▶1 edit
 let s:savedopts=['readonly', 'modifiable', 'scrollbind', 'cursorbind',
             \    'scrollopt', 'wrap', 'foldmethod', 'foldcolumn']
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.