Skip to content

improvements for neovim when set go_term_enabled #1861

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion autoload/go/term.vim
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
" new creates a new terminal with the given command. Mode is set based on the
List: 3 |v:t_list|
" global variable g:go_term_mode, which is by default set to :vsplit
function! go#term#new(bang, cmd) abort
return go#term#newmode(a:bang, a:cmd, go#config#TermMode())
Expand Down Expand Up @@ -90,7 +91,11 @@ function! s:on_exit(job_id, exit_status, event) dict abort

call win_gotoid(self.winid)

call go#list#Populate(l:listtype, errors, self.cmd)
let title = self.cmd
if type(title) == v:t_list
let title = join(self.cmd)
endif
call go#list#Populate(l:listtype, errors, title)
call go#list#Window(l:listtype, len(errors))
if !self.bang
call go#list#JumpToFirst(l:listtype)
Expand Down
2 changes: 1 addition & 1 deletion autoload/go/tool.vim
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function! go#tool#ParseErrors(lines) abort
" Preserve indented lines.
" This comes up especially with multi-line test output.
if match(line, '^\s') >= 0
call add(errors, {"text": line})
call add(errors, {"text": substitute(line, '\r$', '', '')})
endif
endif
endfor
Expand Down