EBhEðªµÄAÐûÌEBhEɽ©ÌXgð\¦AIð³ê½ç½©Ìðs¤Æ��¤A
t@CGNXv[[Æ©Åæ éthðAÈPÉ\zūĵܤvimXNvg tlibÌg��ûðË«~ß½B
ivimXNvggÞlÈOÉÍAðÉ��½È��îñÅ·ªj
ÅAºªÅ��ÌTvB
:UndoBranchViewerÅN®µÄA<C-p>ÅIðµ½sÌbZ[Wð\¦·éB
®©·ÉÍAà¿ëñAtlibªKvB
tlib#input#List()É\¦·é��ñÌXgÆA
ÇÌL[ª³ê½çAÇÌt@NVðÄÑo·©Ì}bsOðn·B
keyªXgÌIðÉg¤L[ÅAagentªt@NVB
XNvgÌÅgÁÄ��é tlib#cmd#OutputAsList()ÍA
R}hÌÊÅ��ñÌXgðìéR}hÅ·B
" XNvgª½xàÇÜêéÌðh~·é½ßÌ�NÜ��È�� :if exists('loaded_undobranch_viewer') :finish :endif :let loaded_undobranch_viewer = 1 " R}hÌè` " :UndoBranchViewerÁÄ·éÆAs:UndoBranchViewer()ªÄÑo³êéB :command! -nargs=0 UndoBranchViewer :call s:UndoBranchViewer() :function! s:UndoBranchViewer() :let g:undolistHandlers = [ \ {'key': 16, 'agent': s:SNR().'AgentUndoPreview', 'key_name': '<c-p>', 'help': 'Undo preview'}, \ {'key': 21, 'agent': s:SNR().'AgentUndoAndClose', 'key_name': '<c-u>', 'help': 'Undo and close'}, \ {'pick_last_item': 0}, \ ] :let s:undolists = tlib#cmd#OutputAsList('undolist') :call tlib#input#List('s', 'UndoBranch', s:undolists, g:undolistHandlers) :endfunction " Xg©ç<c-p>ÅIð³ê½Æ«ÉÄÑo³êéB :function! s:AgentUndoPreview(world, selected) :let l:entry = a:selected[0] " Ið³ê½ï¿½ï¿½ð\¦B :echo l:entry " ��ð\¦Å«éæ¤ÉA¿åÁÆÒÁÄàç¤B :5sleep :return a:world :endfunction " Xg©ç<c-u>ÅIð³ê½Æ«ÉÄÑo³êéB " à¾ÍȪ :function! s:AgentUndoAndClose(world, selected) :return a:world :endfunction " tlibÌXgÅÇêªIð³ê½©ðÁè·é½ßÌ��ðÔ· :function! s:SNR() :return matchstr(expand('<sfile>'), '<SNR>\d\+_\zeSNR$') :endfunction