From 1aa6ebc8cd8a563cdeb89a44da249fe6615d9156 Mon Sep 17 00:00:00 2001 From: Billie Cleek Date: Sat, 23 Dec 2023 23:08:09 -0800 Subject: [PATCH] lsp: check state after checking debug mode Fixes #3618 --- autoload/go/lsp.vim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/autoload/go/lsp.vim b/autoload/go/lsp.vim index e7a29f5554..0ad5842922 100644 --- a/autoload/go/lsp.vim +++ b/autoload/go/lsp.vim @@ -1332,6 +1332,11 @@ let s:logtimer = 0 function! s:debugasync(timer) abort let s:logtimer = 0 + if !go#util#HasDebug('lsp') + let s:log = [] + return + endif + " set the timer to try again if Vim is in a state where we don't want to " change the window. let l:state = state('a') @@ -1341,11 +1346,6 @@ function! s:debugasync(timer) abort return endif - if !go#util#HasDebug('lsp') - let s:log = [] - return - endif - try let l:winid = win_getid()