Skip to content

Commit

Permalink
fix: crash without newest yazi
Browse files Browse the repository at this point in the history
There was a bug in opting in to the feature from 8114817 (feat: add
targeted communication with the yazi instance (opt-in) (#225)). Even if
you had not set `use_yazi_client_id_flag = true` in your config, the
newest yazi was still required.

This commit fixes that bug by removing the passing of the `yazi_id`
(roll forward style). Later changes can still utilize the feature and
build on top of this.
  • Loading branch information
mikavilpas committed Jul 19, 2024
1 parent f8a273d commit ac2a442
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lua/yazi/process/ya_process.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ end

---@param path Path
---@param yazi_id string
---@diagnostic disable-next-line: unused-local
-- selene: allow(unused_variable)
function YaProcess:get_yazi_command(path, yazi_id)
return string.format(
'yazi %s --chooser-file "%s" --client-id "%s"',
'yazi %s --chooser-file "%s"',
vim.fn.shellescape(path.filename),
self.config.chosen_file_path,
yazi_id
self.config.chosen_file_path
)
end

Expand Down

0 comments on commit ac2a442

Please sign in to comment.