]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Move vim flag cast to outside of get (#1486)
authorKeith Smiley <keithbsmiley@gmail.com>
Mon, 15 Jun 2020 15:55:42 +0000 (08:55 -0700)
committerGitHub <noreply@github.com>
Mon, 15 Jun 2020 15:55:42 +0000 (08:55 -0700)
With this config:

```toml
[tool.black]
line-length = 79
```

In neovim, this is loaded as a string which later causes an exception to
be thrown. This makes sure the value is always cast to an int

plugin/black.vim

index a0de953645f769a70d7e270ca14ad9cf77689576..4af044e7a680a85b5851ebcbcabf28186133a37b 100644 (file)
@@ -190,7 +190,7 @@ def get_configs():
     toml_config = {}
 
   return {
-    flag.var_name: toml_config.get(flag.name, flag.cast(vim.eval(flag.vim_rc_name)))
+    flag.var_name: flag.cast(toml_config.get(flag.name, vim.eval(flag.vim_rc_name)))
     for flag in FLAGS
   }