Skip to content

Commit e925b0e

Browse files
committed
Clear line and more accurately leave scroll-mode before runnign commands. Fixes #8
1 parent 252693e commit e925b0e

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

plugin/vimux.vim

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,6 @@ class TmuxSession
101101
def inspect_runner
102102
_run("select-pane -t #{target(:pane => runner_pane)}")
103103
_run("copy-mode")
104-
Vim.command("let g:_VimTmuxInspecting = 1")
105-
end
106-
107-
def stop_inspecting_runner
108-
if Vim.evaluate('exists("g:_VimTmuxInspecting")') != 0
109-
_run("send-keys -t #{target(:pane => runner_pane)} q")
110-
Vim.command("unlet g:_VimTmuxInspecting")
111-
end
112104
end
113105

114106
def current_panes
@@ -129,7 +121,6 @@ class TmuxSession
129121

130122
def runner_pane
131123
if @runner_pane.nil?
132-
type = Vim.evaluate('exists("g:_VimTmuxInspecting")') != 0
133124
use_nearest_pane = Vim.evaluate('exists("g:VimuxUseNearestPane")') != 0
134125
if use_nearest_pane && nearest_inactive_pane_id
135126
_run("select-pane -t #{target(:pane => nearest_inactive_pane_id)}")
@@ -146,23 +137,20 @@ class TmuxSession
146137
end
147138

148139
@runner_pane = nil
149-
clear_vim_cached_runner_pane
150140
runner_pane
151141
end
152142

153143
def interrupt_runner
154-
stop_inspecting_runner
155144
_run("send-keys -t #{target(:pane => runner_pane)} ^c")
156145
end
157146

158147
def run_shell_command(command)
159-
stop_inspecting_runner
148+
_run("send-keys -t #{target(:pane => runner_pane)} q C-u")
160149
_send_command(command, target(:pane => runner_pane))
161150
_move_up_pane
162151
end
163152

164153
def close_other_panes
165-
stop_inspecting_runner
166154
if _run("list-panes").split("\n").length > 1
167155
_run("kill-pane -a")
168156
end

0 commit comments

Comments
 (0)