Skip to content

Commit

Permalink
Merge pull request #3646 from bhcleek/lsp/debug-with-textlock
Browse files Browse the repository at this point in the history
lsp: improve debug logging
  • Loading branch information
bhcleek authored Feb 25, 2024
2 parents 63d122f + b336ecc commit 744aa99
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions autoload/go/lsp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1363,6 +1363,7 @@ function! s:debugasync(timer) abort
silent file `='__GOLSP_LOG__'`
setlocal buftype=nofile bufhidden=wipe nomodified nobuflisted noswapfile nowrap nonumber nocursorline
setlocal filetype=golsplog
setlocal fileencoding=utf-8
call win_gotoid(l:winid)
endif

Expand All @@ -1380,11 +1381,8 @@ function! s:debugasync(timer) abort
call appendbufline(l:name, '$', split(l:data, "\r\n"))
endfor

" TODO(bc): how to move the window's cursor position without switching
" to the window?
call win_gotoid(l:logwinid)
normal! G
call win_gotoid(l:winid)
" Move the window's cursor position without switching to the window
call win_execute(l:logwinid, 'normal! G')
call setbufvar(l:name, '&modifiable', 0)
finally
endtry
Expand Down

0 comments on commit 744aa99

Please sign in to comment.