mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-03 17:24:29 +00:00 
			
		
		
		
	fix(lsp): do not reset buf version when detaching client (#29273)
(cherry picked from commit 37bf4c572a)
Co-authored-by: Ilia Choly <ilia.choly@gmail.com>
			
			
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							46c2962b3a
						
					
				
				
					commit
					0ee3147bc7
				
			@@ -516,7 +516,6 @@ local function buf_detach_client(bufnr, client)
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  client.attached_buffers[bufnr] = nil
 | 
			
		||||
  util.buf_versions[bufnr] = nil
 | 
			
		||||
 | 
			
		||||
  local namespace = lsp.diagnostic.get_namespace(client.id)
 | 
			
		||||
  vim.diagnostic.reset(namespace, bufnr)
 | 
			
		||||
@@ -601,6 +600,7 @@ local function buf_attach(bufnr)
 | 
			
		||||
        buf_detach_client(bufnr, client)
 | 
			
		||||
      end
 | 
			
		||||
      attached_buffers[bufnr] = nil
 | 
			
		||||
      util.buf_versions[bufnr] = nil
 | 
			
		||||
    end,
 | 
			
		||||
 | 
			
		||||
    -- TODO if we know all of the potential clients ahead of time, then we
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user