Fix potential \r in Windows target/repl-port file

This commit is contained in:
Tim Pope 2013-01-01 20:06:14 -05:00
parent b21e531998
commit 8757e41cf3

View File

@ -916,7 +916,7 @@ function! s:leiningen_connect()
endif
let portfile = b:leiningen_root . '/target/repl-port'
if getfsize(portfile) > 0 && getftime(portfile) !=# get(s:leiningen_repl_ports, b:leiningen_root, -1)
let port = readfile(portfile, 'b', 1)[0]
let port = matchstr(readfile(portfile, 'b', 1)[0], '\d\+')
let s:leiningen_repl_ports[b:leiningen_root] = getftime(portfile)
try
call s:register_connection(nrepl#foreplay_connection#open(port), b:leiningen_root)