Skip to content

Commit e49d6c2

Browse files
adriaanzontpope
authored andcommitted
Only add colon if prompt ends with word (#204)
Lets you use your own ending characters, instead of always adding ': '. Closes #203
1 parent 2d05440 commit e49d6c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/surround.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function! s:process(string)
9292
let m = matchstr(a:string,nr2char(i).'.\{-\}\ze'.nr2char(i))
9393
if m != ''
9494
let m = substitute(strpart(m,1),'\r.*','','')
95-
let repl_{i} = input(substitute(m,':\s*$','','').': ')
95+
let repl_{i} = input(match(m,'\w\+$') >= 0 ? m.': ' : m)
9696
endif
9797
endfor
9898
let s = ""

0 commit comments

Comments
 (0)