Skip to content

Commit

Permalink
bugfix in ToFromAgenda so it goes to proper non-Agenda buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
hsitz committed Dec 18, 2011
1 parent b6072ce commit 03a7258
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ftplugin/org.vim
Expand Up @@ -3091,7 +3091,13 @@ function! s:ResultsToAgenda( search_type )
endfunction
function! s:ToFromAgenda()
if bufname('%') == '__Agenda__'
windo if bufname('%') !~ '__Agenda__\|__Calendar' | return | endif
for i in range(1, winnr('$'))
exe i . 'wincmd w'
if bufname('%') !~ '__Agenda__\|__Calendar'
break
endif
endfor
"windo if bufname('%') !~ '__Agenda__\|__Calendar' | let return | endif
elseif bufwinnr('__Agenda__') > 0
exec bufwinnr('__Agenda__') . 'wincmd w'
endif
Expand Down

0 comments on commit 03a7258

Please sign in to comment.