@@ -114,7 +114,9 @@ def checkerDiagToLspDict(diag: CheckerDiagnostic) -> Diagnostic:
114114 start = Position (
115115 line = diag .line_number or 0 , character = diag .column_number or 0
116116 ),
117- end = Position (line = diag .line_number or 0 , character = diag .column_number or 0 ),
117+ end = Position (
118+ line = diag .line_number or 0 , character = (diag .column_number or 0 ) + 1
119+ ),
118120 ),
119121 message = diag .text ,
120122 severity = _translateSeverity (diag .severity ),
@@ -323,7 +325,7 @@ def references(self, params: ReferenceParams) -> Optional[List[Location]]:
323325 Location (
324326 uri = from_fs_path (str (element .owner )),
325327 range = Range (
326- start = Position (line , column ), end = Position (line , column )
328+ start = Position (line , column ), end = Position (line , column + 1 )
327329 ),
328330 )
329331 ]
@@ -334,7 +336,7 @@ def references(self, params: ReferenceParams) -> Optional[List[Location]]:
334336 Location (
335337 uri = from_fs_path (str (reference .owner )),
336338 range = Range (
337- start = Position (line , column ), end = Position (line , column )
339+ start = Position (line , column ), end = Position (line , column + 1 )
338340 ),
339341 )
340342 ]
@@ -465,7 +467,7 @@ def hover(self, params: HoverParams) -> Optional[Hover]:
465467 line = params .position .line , character = params .position .character
466468 ),
467469 end = Position (
468- line = params .position .line , character = params .position .character
470+ line = params .position .line , character = params .position .character + 1
469471 ),
470472 ),
471473 )
@@ -505,7 +507,7 @@ def definitions(
505507 # Included paths are dependencies but they're referred to by path, so
506508 # we return a definition to point to the beginning of the file
507509 if isinstance (dependency , IncludedPath ):
508- return [Location (target_uri , Range (Position (0 , 0 ), Position (0 , 0 )))]
510+ return [Location (target_uri , Range (Position (0 , 0 ), Position (0 , 1 )))]
509511
510512 locations : List [Location ] = []
511513
0 commit comments