Permalink
Browse files

Merge branch 'session_issue' of https://github.com/grota/lusty into g…

…rota-session_issue
  • Loading branch information...
2 parents c3c2e73 + 059be5c commit c48ab27cba4390cda2f50a8d2d1af7c3fd3a5442 @sjbach committed Jun 3, 2012
Showing with 16 additions and 13 deletions.
  1. +5 −4 plugin/lusty-explorer.vim
  2. +5 −4 plugin/lusty-juggler.vim
  3. +1 −1 src/explorer.vim
  4. +1 −1 src/juggler.vim
  5. +4 −3 src/lusty/buffer-stack.rb
@@ -322,7 +322,7 @@ endfunction
" Setup the autocommands that handle buffer MRU ordering.
augroup LustyExplorer
autocmd!
- autocmd BufEnter * ruby LustyE::profile() { $le_buffer_stack.push }
+ autocmd BufAdd,BufEnter * ruby LustyE::profile() { $le_buffer_stack.push }
autocmd BufDelete * ruby LustyE::profile() { $le_buffer_stack.pop }
autocmd BufWipeout * ruby LustyE::profile() { $le_buffer_stack.pop }
augroup End
@@ -2356,12 +2356,13 @@ class BufferStack
end
def push
- @stack.delete $curbuf.number
- @stack << $curbuf.number
+ buf_number = VIM::evaluate('expand("<abuf>")').to_i
+ @stack.delete buf_number
+ @stack << buf_number
end
def pop
- number = VIM::evaluate('bufnr(expand("<afile>"))')
+ number = VIM::evaluate('bufnr(expand("<abuf>"))')
@stack.delete number
end
View
@@ -287,7 +287,7 @@ endfunction
" Setup the autocommands that handle buffer MRU ordering.
augroup LustyJuggler
autocmd!
- autocmd BufEnter * ruby LustyJ::profile() { $lj_buffer_stack.push }
+ autocmd BufAdd,BufEnter * ruby LustyJ::profile() { $lj_buffer_stack.push }
autocmd BufDelete * ruby LustyJ::profile() { $lj_buffer_stack.pop }
autocmd BufWipeout * ruby LustyJ::profile() { $lj_buffer_stack.pop }
augroup End
@@ -1250,12 +1250,13 @@ class BufferStack
end
def push
- @stack.delete $curbuf.number
- @stack << $curbuf.number
+ buf_number = VIM::evaluate('expand("<abuf>")').to_i
+ @stack.delete buf_number
+ @stack << buf_number
end
def pop
- number = VIM::evaluate('bufnr(expand("<afile>"))')
+ number = VIM::evaluate('bufnr(expand("<abuf>"))')
@stack.delete number
end
View
@@ -322,7 +322,7 @@ endfunction
" Setup the autocommands that handle buffer MRU ordering.
augroup LustyExplorer
autocmd!
- autocmd BufEnter * ruby LustyE::profile() { $le_buffer_stack.push }
+ autocmd BufAdd,BufEnter * ruby LustyE::profile() { $le_buffer_stack.push }
autocmd BufDelete * ruby LustyE::profile() { $le_buffer_stack.pop }
autocmd BufWipeout * ruby LustyE::profile() { $le_buffer_stack.pop }
augroup End
View
@@ -287,7 +287,7 @@ endfunction
" Setup the autocommands that handle buffer MRU ordering.
augroup LustyJuggler
autocmd!
- autocmd BufEnter * ruby LustyJ::profile() { $lj_buffer_stack.push }
+ autocmd BufAdd,BufEnter * ruby LustyJ::profile() { $lj_buffer_stack.push }
autocmd BufDelete * ruby LustyJ::profile() { $lj_buffer_stack.pop }
autocmd BufWipeout * ruby LustyJ::profile() { $lj_buffer_stack.pop }
augroup End
@@ -62,12 +62,13 @@ def length
end
def push
- @stack.delete $curbuf.number
- @stack << $curbuf.number
+ buf_number = VIM::evaluate('expand("<abuf>")').to_i
+ @stack.delete buf_number
+ @stack << buf_number
end
def pop
- number = VIM::evaluate('bufnr(expand("<afile>"))')
+ number = VIM::evaluate('bufnr(expand("<abuf>"))')
@stack.delete number
end

0 comments on commit c48ab27

Please sign in to comment.