Skip to content

Commit

Permalink
Merge branch 'session_issue' of https://github.com/grota/lusty into g…
Browse files Browse the repository at this point in the history
…rota-session_issue
  • Loading branch information
sjbach committed Jun 3, 2012
2 parents c3c2e73 + 059be5c commit c48ab27
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
9 changes: 5 additions & 4 deletions plugin/lusty-explorer.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
9 changes: 5 additions & 4 deletions plugin/lusty-juggler.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/explorer.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/juggler.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions src/lusty/buffer-stack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c48ab27

Please sign in to comment.