File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,12 @@ def GetCurrentBufferNumber():
182182
183183
184184def GetBufferChangedTick ( bufnr ):
185- return GetIntValue ( f'getbufvar({ bufnr } , "changedtick")' or 0 )
185+ try :
186+ return GetIntValue ( f'getbufvar({ bufnr } , "changedtick")' )
187+ except ValueError :
188+ # For some reason, occasionally changedtick returns '' and causes an error.
189+ # In that case, just return 0 rather than spamming an error to the console.
190+ return 0
186191
187192
188193# Returns a range covering the earliest and latest lines visible in the current
@@ -929,7 +934,7 @@ def GetBoolValue( variable ):
929934
930935
931936def GetIntValue ( variable ):
932- return int ( vim .eval ( variable ) )
937+ return int ( vim .eval ( variable ) or 0 )
933938
934939
935940def _SortChunksByFile ( chunks ):
You can’t perform that action at this time.
0 commit comments