summaryrefslogtreecommitdiff
path: root/dot_config/nvim/ftplugin/markdown_quote.fnl
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dot_config/nvim/ftplugin/markdown_quote.fnl7
1 files changed, 4 insertions, 3 deletions
diff --git a/dot_config/nvim/ftplugin/markdown_quote.fnl b/dot_config/nvim/ftplugin/markdown_quote.fnl
index a75c966..291e58f 100644
--- a/dot_config/nvim/ftplugin/markdown_quote.fnl
+++ b/dot_config/nvim/ftplugin/markdown_quote.fnl
@@ -5,11 +5,12 @@
Line1 is the start of the selection, and Line2 is the end."
(let [sl (or (?. opts :line1) (vim.fn.line :v))
el (or (?. opts :line2) (vim.fn.line :.))
- swap (> sl el)]
+ swap (> sl el)
+ dec #(- $ 1)]
(if swap
- {:line1 (- 1 el)
+ {:line1 (dec el)
:line2 sl}
- {:line1 (- 1 sl)
+ {:line1 (dec sl)
:line2 el})))
(fn maplines [f]