Skip to content

Commit

Permalink
Drop support for Vim version <9.0.0430
Browse files Browse the repository at this point in the history
  • Loading branch information
Bakudankun committed Apr 1, 2023
1 parent b83e807 commit 83498c4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# base64.vim

This is a Vim9 plugin that provides Base64 encoding and decoding commands and
functions. Neovim and earlier Vim are not supported.
functions.

You can use `gb` / `gB` to encode / decode strings in a buffer.
You can use `gb`/`gB` to encode/decode strings in a buffer.

See the [help doc](doc/base64.txt) for more information.


## Prerequisites

This plugin requires Vim version \>=9.0.0430. Neovim and earlier Vim are
not supported.

## License

[Vim License](https://www.gnu.org/licenses/vim-license.txt)
2 changes: 1 addition & 1 deletion autoload/base64.vim
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ enddef
def Str2Blob(input: list<string>): blob
return input
->mapnew((_, line) =>
(has('patch-9.0.0430') ? repeat(0z00, len(line)) : repeat([0], len(line))->list2blob())
repeat(0z00, len(line))
->map((i: number, _): number => char2nr(strpart(line, i, 1)))
->map((_, v) => v == 0x0A ? 0x00 : v))
->reduce((acc, val) => acc + 0z0A + val)
Expand Down

0 comments on commit 83498c4

Please sign in to comment.