mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 01:34:25 +00:00 
			
		
		
		
	fix(lsp): default to UTF-16 in make_position_params
This commit is contained in:
		
				
					committed by
					
						
						Michael Lingelbach
					
				
			
			
				
	
			
			
			
						parent
						
							0c1585bc63
						
					
				
				
					commit
					2e3a4747e2
				
			@@ -1788,7 +1788,9 @@ local function make_position_param()
 | 
				
			|||||||
  if not line then
 | 
					  if not line then
 | 
				
			||||||
    return { line = 0; character = 0; }
 | 
					    return { line = 0; character = 0; }
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
  col = str_utfindex(line, col)
 | 
					  -- TODO handle offset_encoding
 | 
				
			||||||
 | 
					  local _
 | 
				
			||||||
 | 
					  _, col = str_utfindex(line, col)
 | 
				
			||||||
  return { line = row; character = col; }
 | 
					  return { line = row; character = col; }
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user