Skip to content

Commit a91e177

Browse files
committed
Add VimuxClearRunnerHistory command
1 parent 0eefeff commit a91e177

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

plugin/vimux.vim

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ command VimuxCloseWindows :call VimuxCloseWindows()
1616
command VimuxInspectRunner :call VimuxInspectRunner()
1717
command VimuxInterruptRunner :call VimuxInterruptRunner()
1818
command VimuxPromptCommand :call VimuxPromptCommand()
19+
command VimuxClearRunnerHistory :call VimuxClearRunnerHistory()
1920

2021
" DEPRECATED
2122
command RunLastVimTmuxCommand :call VimuxRunLastCommand()
@@ -148,6 +149,10 @@ function PromptVimTmuxCommand()
148149
endfunction
149150

150151

152+
function VimuxClearRunnerHistory()
153+
ruby CurrentTmuxSession.new.clear_runner_history
154+
endfunction
155+
151156
ruby << EOF
152157
class TmuxSession
153158
def initialize(session, window, pane)
@@ -173,6 +178,10 @@ class TmuxSession
173178
Vim.command("unlet g:_VimTmuxRunnerPane")
174179
end
175180

181+
def clear_runner_history
182+
_run("clear-history -t #{target(:pane => runner_pane)}")
183+
end
184+
176185
def height
177186
if Vim.evaluate('exists("g:VimuxHeight")') != 0
178187
Vim.evaluate('g:VimuxHeight')

0 commit comments

Comments
 (0)