summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
Diffstat (limited to '.config')
-rw-r--r--.config/nvim/after/ftplugin/gitrebase.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/.config/nvim/after/ftplugin/gitrebase.lua b/.config/nvim/after/ftplugin/gitrebase.lua
index 3a81d62..948ee30 100644
--- a/.config/nvim/after/ftplugin/gitrebase.lua
+++ b/.config/nvim/after/ftplugin/gitrebase.lua
@@ -11,12 +11,10 @@ local function map(lhs, rhs)
node = node:parent()
end
- if node == nil or node:type() ~= 'operation' then
- return
+ if node ~= nil then
+ local sr, sc, er, ec = node:child(0):range()
+ vim.api.nvim_buf_set_text(0, sr, sc, er, ec, { rhs })
end
-
- local sr, sc, er, ec = node:child(0):range()
- vim.api.nvim_buf_set_text(0, sr, sc, er, ec, { rhs })
end, {
buffer = true,
noremap = true,