summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-12-21 18:17:20 -0500
committerJune McEnroe <june@causal.agency>2020-12-21 18:17:20 -0500
commitc39d9e5513f3ae84efaa1d3058dcb0b40263506c (patch)
tree911b4c21875d08b98959056862fb674bb52363aa /doc
parentMove rfc.vim to doc/rfc (diff)
downloadsrc-c39d9e5513f3ae84efaa1d3058dcb0b40263506c.tar.gz
src-c39d9e5513f3ae84efaa1d3058dcb0b40263506c.zip
Match the number part of the argument to :RFC
This fixes pressing K on "RFC3501", for example.
Diffstat (limited to 'doc')
-rw-r--r--doc/rfc/rfc.vim6
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/rfc/rfc.vim b/doc/rfc/rfc.vim
index 56d2085c..2455d8a6 100644
--- a/doc/rfc/rfc.vim
+++ b/doc/rfc/rfc.vim
@@ -3,7 +3,11 @@ if !exists('g:rfc_path')
 endif
 
 function! s:RFC(number)
-	let number = (empty(a:number) ? '-index' : str2nr(a:number, 10))
+	if !empty(a:number)
+		let number = str2nr(matchstr(a:number, '\d\+'), 10)
+	else
+		let number = '-index'
+	endif
 	let path = expand(g:rfc_path . '/rfc' . number . '.txt.gz')
 	if filereadable(path)
 		execute 'silent' 'noswapfile' 'view' path