Skip to content

Commit

Permalink
Merge pull request #45 from ttak0422/ttak0422/bugfix
Browse files Browse the repository at this point in the history
bugfix
  • Loading branch information
ttak0422 authored Apr 28, 2024
2 parents 03bc679 + bfde174 commit 7d79841
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion bundler/src/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,13 @@ pub fn bundle<'a>(config: &'a content::Content) -> Bundle<'a> {
.or_default()
.push(id);
}

for command in &g.on_commands {
load_option
.on_commands
.entry(command.as_str())
.or_default()
.push(id);
}
if g.is_timer_client {
load_option.timer_clients.push(id);
}
Expand Down
4 changes: 2 additions & 2 deletions bundler/src/content/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ fn mk_simple_code(code: String, target: &Target) -> String {
} else {
match (target, language) {
(Target::Vim, Language::Vim) => code,
(Target::Neovim, Language::Vim) => format!("vim.cmd([[{}]])", code),
(Target::Neovim, Language::Vim) => format!("vim.cmd([=[{}]=])", code),
(Target::Neovim, Language::Lua) => code,
_ => panic!("invalid target and language combination"),
}
Expand All @@ -108,7 +108,7 @@ fn mk_detail_code(cfg: payload::DetailConfig, target: &Target) -> String {
let args = mk_args_code(cfg.args, &language);
match (target, language) {
(Target::Vim, Language::Vim) => format!("{}\n{}", args, cfg.code),
(Target::Neovim, Language::Vim) => format!("vim.cmd([[\n{}\n{}]])", args, cfg.code),
(Target::Neovim, Language::Vim) => format!("vim.cmd([=[\n{}\n{}]=])", args, cfg.code),
(Target::Neovim, Language::Lua) => format!("{}\n{}", args, cfg.code),
_ => panic!("invalid target and language combination"),
}
Expand Down

0 comments on commit 7d79841

Please sign in to comment.