File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -453,7 +453,7 @@ ${lines.join("\n")}
453
453
args . length < 3 ||
454
454
typeof args [ 0 ] !== "string" ||
455
455
typeof args [ 1 ] !== "string" ||
456
- typeof args [ 2 ] !== "string "
456
+ typeof args [ 2 ] !== "number "
457
457
) {
458
458
throw new Error (
459
459
`Expected buffer tracker args to be [eventType, filePath, bufnr]` ,
@@ -473,13 +473,12 @@ ${lines.join("\n")}
473
473
}
474
474
475
475
const absFilePath = args [ 1 ] as AbsFilePath ;
476
- const bufnr = parseInt ( args [ 2 ] ) as BufNr ;
476
+ const bufnr = args [ 2 ] as BufNr ;
477
477
478
478
magenta . onBufferTrackerEvent ( eventType , absFilePath , bufnr ) ;
479
479
} catch ( err ) {
480
480
nvim . logger ?. error (
481
- `Error handling buffer tracker event for ${ JSON . stringify ( args ) } :` ,
482
- err ,
481
+ `Error handling buffer tracker event for ${ JSON . stringify ( args ) } : ${ err instanceof Error ? err . message + "\n" + err . stack : JSON . stringify ( err ) } ` ,
483
482
) ;
484
483
}
485
484
} ) ;
You can’t perform that action at this time.
0 commit comments