Skip to content

Commit

Permalink
Merge pull request #95 from monaqa/fix-cmd_normal_bang
Browse files Browse the repository at this point in the history
fix: `:normal!` instead of `:normal` (force to use default `g@`)
  • Loading branch information
monaqa authored Jul 15, 2024
2 parents 750f802 + 64a9116 commit ed4d6a5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/dial/map.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ local function _cmd_sequence(direction, mode, group_name, count)
local setopfunc = cmdcr([[let &opfunc="dial#operator#]] .. direction .. "_" .. mode .. [["]])
local textobj =
util.if_expr(mode == "normal" or mode == "gnormal", cmdcr [[lua require("dial.command").textobj()]], "")

if count ~= nil then
if type(count) ~= "number" then
error "count must be a integer."
Expand All @@ -46,7 +47,10 @@ function M.manipulate(direction, mode, group_name, count)
if count == nil then
count = vim.v.count1
end
vim.cmd.normal(vim.api.nvim_replace_termcodes(_cmd_sequence(direction, mode, group_name, count), true, true, true))
vim.cmd.normal {
vim.api.nvim_replace_termcodes(_cmd_sequence(direction, mode, group_name, count), true, true, true),
bang = true,
}
end

---@param group_name? string
Expand Down

0 comments on commit ed4d6a5

Please sign in to comment.