Skip to content

Commit d04f59b

Browse files
committed
Fix bugs in user/reset
1 parent d439f1e commit d04f59b

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

plugin/socketrepl.vim.debug

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
let g:is_running = 0
2-
let g:channel = -1
2+
let g:channel = 0
33

44
"When the plugin is restarted at the repl, it reconnects, using the next
55
"available channel.
6-
1function! PluginRestart()
6+
function! PluginRestart()
77
let g:is_running = 0
88
endfunction
99

src/socket_repl/socket_repl_plugin.clj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,14 @@
179179
plugin))
180180

181181
(defn stop
182-
[plugin]
182+
[{:keys [nvim] :as plugin}]
183183
(log-stop
184184
"plugin"
185+
186+
;; Close the repl log buffer
187+
(nvim/vim-command
188+
nvim (format "bd! %s" (get-rlog-buffer-number nvim)))
189+
185190
(async/close! (:code-channel plugin))
186191
plugin))
187192

src/user.clj

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@
1212
[]
1313
(reset! system-atom (system/new-system true)))
1414

15-
(defn reset
16-
[]
17-
(system/stop @system-atom)
18-
(refresh)
19-
(go))
20-
2115
(defn stop
2216
[]
2317
(system/stop @system-atom))
18+
19+
(defn reset
20+
[]
21+
(system/stop @system-atom)
22+
(refresh :after `go))

0 commit comments

Comments
 (0)