Skip to content

Commit 543083a

Browse files
authored
Merge pull request #2 from kr40/master
Merged from Master
2 parents b62b1c7 + 45307ac commit 543083a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lua/nvim-macros/init.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ end
6060
-- Set macro to register (Escaped termcodes)
6161
local function set_macro_to_register(macro_content)
6262
if not macro_content then
63-
print_error("Macro content is nil. Cannot set to register.")
63+
print_error("Macro content is empty. Cannot set to register.")
6464
return
6565
end
6666

@@ -120,7 +120,7 @@ function M.yank(register)
120120
register = register or vim.fn.input("Please specify a register to yank from: ")
121121
local register_content = vim.fn.getreg(register)
122122
if not register_content or register_content == "" then
123-
print_error("Invalid or empty register content!")
123+
print_error("Register is empty or has invalid content!")
124124
return
125125
end
126126

@@ -132,7 +132,7 @@ end
132132
-- Run macros from inside a function (For keymaps)
133133
function M.run(macro)
134134
if not macro then
135-
print_error("Macro is nil. Cannot run.")
135+
print_error("Macro is Empty. Cannot run.")
136136
return
137137
end
138138
vim.cmd.normal(vim.api.nvim_replace_termcodes(macro, true, true, true))
@@ -208,15 +208,15 @@ function M.select_and_yank_macro()
208208

209209
if yank_option == "1" then
210210
set_macro_to_register(macro_content)
211-
print("Yanked to Clipboard (p to paste) " .. choice:match("^[^|]+"))
211+
print("Yanked to Clipboard (p to paste): " .. choice:match("^[^|]+"))
212212
elseif yank_option == "2" then
213213
local target_register = vim.fn.input("Please specify a register to set the macro to: ")
214214
if not target_register or target_register == "" then
215215
print_error("Invalid or empty register specified.")
216216
return
217217
end
218218
set_decoded_macro_to_register(encoded_content, target_register)
219-
print("Yanked Raw Macro " .. choice:match("^[^|]+") .. " into register `" .. target_register .. "`")
219+
print("Yanked Raw Macro: " .. choice:match("^[^|]+") .. " into register `" .. target_register .. "`")
220220
else
221221
print_error("Invalid yank option selected.")
222222
end

0 commit comments

Comments
 (0)