summary refs log tree commit diff
path: root/home/.config/nvim
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-12-19 22:53:41 -0500
committerJune McEnroe <june@causal.agency>2020-12-19 22:53:41 -0500
commitdfcbc8ba3c555e6eda5dae68fb89c4e7868e3dc9 (patch)
tree3f9ed7376bb92e0c7286972d1233530f16121555 /home/.config/nvim
parentMove :RFC to plugin script (diff)
downloadsrc-dfcbc8ba3c555e6eda5dae68fb89c4e7868e3dc9.tar.gz
src-dfcbc8ba3c555e6eda5dae68fb89c4e7868e3dc9.zip
Convert :RFC number to number
This removes any leading zeros such as in rfc-index.txt.
Diffstat (limited to 'home/.config/nvim')
-rw-r--r--home/.config/nvim/plugin/rfc.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/home/.config/nvim/plugin/rfc.vim b/home/.config/nvim/plugin/rfc.vim
index d0aac655..0c724492 100644
--- a/home/.config/nvim/plugin/rfc.vim
+++ b/home/.config/nvim/plugin/rfc.vim
@@ -3,12 +3,12 @@ if !exists('g:rfc_path')
 endif
 
 function! s:RFC(number)
-	let number = (empty(a:number) ? '-index' : a:number)
+	let number = (empty(a:number) ? '-index' : str2nr(a:number, 10))
 	let path = expand(g:rfc_path . '/rfc' . number . '.txt.gz')
 	if filereadable(path)
 		execute 'silent' 'noswapfile' 'view' path
 	else
-		echohl ErrorMsg | echo 'No such RFC' number | echohl None
+		echohl ErrorMsg | echo 'No such RFC' a:number | echohl None
 	endif
 endfunction