Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita36f50c

Browse files
authored
fix: runner cmd#241 (#329)
The `Run` class always uses the command passed during theinitialization, so the profile config changes don't apply.
1 parent905013e commita36f50c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

‎lua/java/runner/run.lua‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,16 @@ local notify = require('java-core.utils.notify')
77
---@fieldbuffernumber
88
---@fieldis_runningboolean
99
---@fieldis_manually_stopedboolean
10-
---@fieldprivatecmd string
1110
---@fieldprivateterm_chan_id number
1211
---@fieldprivatejob_chan_id number|nil
1312
---@fieldprivateis_failure boolean
1413
localRun=class()
1514

1615
---@paramdap_configjava-dap.DapLauncherConfig
1716
---@paramcmdstring[]
18-
functionRun:_init(dap_config,cmd)
17+
functionRun:_init(dap_config)
1918
self.name=dap_config.name
2019
self.main_class=dap_config.mainClass
21-
self.cmd=table.concat(cmd,'')
2220
self.buffer=vim.api.nvim_create_buf(false,true)
2321
self.term_chan_id=vim.api.nvim_open_term(self.buffer, {
2422
on_input=function(_,_,_,data)
@@ -27,11 +25,13 @@ function Run:_init(dap_config, cmd)
2725
})
2826
end
2927

30-
functionRun:start()
28+
---@paramcmdstring[]
29+
functionRun:start(cmd)
30+
localmerged_cmd=table.concat(cmd,'')
3131
self.is_running=true
32-
self:send_term(self.cmd)
32+
self:send_term(merged_cmd)
3333

34-
self.job_chan_id=vim.fn.jobstart(self.cmd, {
34+
self.job_chan_id=vim.fn.jobstart(merged_cmd, {
3535
pty=true,
3636
on_stdout=function(_,data)
3737
self:send_term(data)

‎lua/java/runner/runner.lua‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function Runner:start_run(args)
4141
self.curr_run=run
4242
self.logger:set_buffer(run.buffer)
4343

44-
run:start()
44+
run:start(cmd)
4545
end
4646

4747
---Stops the user selected run

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp