Add VimuxClearRunnerHistory command

1.0.0rc1
benmills 12 years ago
parent 0eefeff876
commit a91e177801

@ -16,6 +16,7 @@ command VimuxCloseWindows :call VimuxCloseWindows()
command VimuxInspectRunner :call VimuxInspectRunner() command VimuxInspectRunner :call VimuxInspectRunner()
command VimuxInterruptRunner :call VimuxInterruptRunner() command VimuxInterruptRunner :call VimuxInterruptRunner()
command VimuxPromptCommand :call VimuxPromptCommand() command VimuxPromptCommand :call VimuxPromptCommand()
command VimuxClearRunnerHistory :call VimuxClearRunnerHistory()
" DEPRECATED " DEPRECATED
command RunLastVimTmuxCommand :call VimuxRunLastCommand() command RunLastVimTmuxCommand :call VimuxRunLastCommand()
@ -148,6 +149,10 @@ function PromptVimTmuxCommand()
endfunction endfunction
function VimuxClearRunnerHistory()
ruby CurrentTmuxSession.new.clear_runner_history
endfunction
ruby << EOF ruby << EOF
class TmuxSession class TmuxSession
def initialize(session, window, pane) def initialize(session, window, pane)
@ -173,6 +178,10 @@ class TmuxSession
Vim.command("unlet g:_VimTmuxRunnerPane") Vim.command("unlet g:_VimTmuxRunnerPane")
end end
def clear_runner_history
_run("clear-history -t #{target(:pane => runner_pane)}")
end
def height def height
if Vim.evaluate('exists("g:VimuxHeight")') != 0 if Vim.evaluate('exists("g:VimuxHeight")') != 0
Vim.evaluate('g:VimuxHeight') Vim.evaluate('g:VimuxHeight')

Loading…
Cancel
Save