Pārlūkot izejas kodu

Fix traceback when diagnostic comtains special characters

Ben Jackson 2 gadi atpakaļ
vecāks
revīzija
c80832614e
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      python/ycm/vimsupport.py

+ 3 - 1
python/ycm/vimsupport.py

@@ -361,7 +361,9 @@ def AddTextProperty( buffer_number,
       'type': prop_type,
       'bufnr': buffer_number
     } )
-    return GetIntValue( f'prop_add( { line }, { column }, { extra_args } )' )
+    return GetIntValue( f'prop_add( { line }, '
+                                  f'{ column }, '
+                                  f'{ json.dumps( extra_args ) } )' )
   else:
     extra_args[ 'hl_group' ] = prop_type
     # Neovim uses 0-based offsets