From 8813452151679ddeadc4b214c69cf276512da188 Mon Sep 17 00:00:00 2001 From: Janusz Bossy Date: Wed, 17 Jul 2024 15:55:50 +0200 Subject: [PATCH] Correctly detect rdbg prompt when parallel testing When tests are run in parallel instead of the standard `(rdbg)` prompt it's also decorated with the stopped process ID. This change allows the prompt to be detected by checking for `[%)@]` at the end so should properly detect `(rdbg@rails_test#84025)` --- lua/ror/test.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/ror/test.lua b/lua/ror/test.lua index 03a17cb..3b89ebf 100644 --- a/lua/ror/test.lua +++ b/lua/ror/test.lua @@ -25,7 +25,7 @@ local function verify_debugger() if last_line == '[Process exited 1]' or vim.fn.bufnr() == M.terminal_bufnr then return - elseif last_line:match('%(byebug%)') or last_line:match('pry%(#.*%)') or last_line:match('%(rdbg%)') or last_line == ':' then + elseif last_line:match('%(byebug%)') or last_line:match('pry%(#.*%)') or last_line:match('%(rdbg[%)@]') or last_line == ':' then M.attach_terminal() vim.cmd("startinsert") else