소스 검색

sometimes changedtick doesn't return a value

Ben Jackson 2 년 전
부모
커밋
060c5641db
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      python/ycm/vimsupport.py

+ 1 - 1
python/ycm/vimsupport.py

@@ -182,7 +182,7 @@ def GetCurrentBufferNumber():
 
 
 def GetBufferChangedTick( bufnr ):
-  return GetIntValue( f'getbufvar({ bufnr }, "changedtick")' )
+  return GetIntValue( f'getbufvar({ bufnr }, "changedtick") ?? 0' )
 
 
 # Returns a range covering the earliest and latest lines visible in the current