From 9745f7a8b6407b349e587baa9e07daf7ae2eee92 Mon Sep 17 00:00:00 2001 From: Lampros Date: Wed, 19 Oct 2022 18:15:37 +0300 Subject: [PATCH] Added support for v:count for C-a/C-x --- README.md | 2 +- lua/boole/init.lua | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4451af16fb50a..4d1d51550178d 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ require('boole').setup({ }, -- User defined loops additions = { - {'Foo', 'Bar'} + {'Foo', 'Bar'}, {'tic', 'tac', 'toe'} }, }) diff --git a/lua/boole/init.lua b/lua/boole/init.lua index 7c043bd151819..f23dce960fa98 100644 --- a/lua/boole/init.lua +++ b/lua/boole/init.lua @@ -334,9 +334,10 @@ M.run = function(direction) if match ~= nil then return vim.cmd(':normal ciw' .. match) end -- and compatability - if direction == 'increment' then return vim.cmd(':normal!') end - if direction == 'decrement' then return vim.cmd(':normal!') end + if direction == 'increment' then return vim.cmd(':normal!'..vim.v.count..'') end + if direction == 'decrement' then return vim.cmd(':normal!'..vim.v.count..'') end + vim.api.nvim_cmd() return false end