Skip to content

Commit e297f4b

Browse files
committed
ghcmod#info(): Remove trailing newlines (#24)
1 parent ef19a9c commit e297f4b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

autoload/ghcmod.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ function! ghcmod#info(fexp)"{{{
7272
let l:mod = ghcmod#detect_module()
7373
let l:cmd = ghcmod#build_command(['info', l:file, l:mod, a:fexp])
7474
let l:output = s:system(l:cmd)
75+
" Remove trailing newlines to prevent empty lines from being echoed
76+
let l:output = substitute(l:output, '\n*$', '', '')
7577

7678
return l:output
7779
endfunction"}}}

0 commit comments

Comments
 (0)