From a91e17780190aa34cd2336a1fab33e0408df99c2 Mon Sep 17 00:00:00 2001 From: benmills Date: Fri, 15 Jun 2012 11:02:43 -0700 Subject: [PATCH] Add VimuxClearRunnerHistory command --- plugin/vimux.vim | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugin/vimux.vim b/plugin/vimux.vim index 5ba957f..14b4f74 100644 --- a/plugin/vimux.vim +++ b/plugin/vimux.vim @@ -16,6 +16,7 @@ command VimuxCloseWindows :call VimuxCloseWindows() command VimuxInspectRunner :call VimuxInspectRunner() command VimuxInterruptRunner :call VimuxInterruptRunner() command VimuxPromptCommand :call VimuxPromptCommand() +command VimuxClearRunnerHistory :call VimuxClearRunnerHistory() " DEPRECATED command RunLastVimTmuxCommand :call VimuxRunLastCommand() @@ -148,6 +149,10 @@ function PromptVimTmuxCommand() endfunction +function VimuxClearRunnerHistory() + ruby CurrentTmuxSession.new.clear_runner_history +endfunction + ruby << EOF class TmuxSession def initialize(session, window, pane) @@ -173,6 +178,10 @@ class TmuxSession Vim.command("unlet g:_VimTmuxRunnerPane") end + def clear_runner_history + _run("clear-history -t #{target(:pane => runner_pane)}") + end + def height if Vim.evaluate('exists("g:VimuxHeight")') != 0 Vim.evaluate('g:VimuxHeight')