diff options
| author | 2024-07-26 09:51:19 +0200 | |
|---|---|---|
| committer | 2024-07-26 09:51:19 +0200 | |
| commit | 786f85d0f537e8f19e7c424b57513a12bfb24373 (patch) | |
| tree | 2ad593ba52e0fd7de8754713ac46a87ab7a22545 /dot_config/nvim/ftplugin/markdown_quote.fnl | |
| parent | nvim: port starlight (diff) | |
nvim/mdquote: fix negative start line bug
Lmao oops, tfw you don't function without `dec` anymore.
Diffstat (limited to 'dot_config/nvim/ftplugin/markdown_quote.fnl')
| -rw-r--r-- | dot_config/nvim/ftplugin/markdown_quote.fnl | 7 |
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] |
