Skip to content

Commit e219ee0

Browse files
committed
v:number[min|max] should be Number.[MAX|MIN]_SAFE_INTEGER
1 parent 9d1dcfc commit e219ee0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vimscript/expression/evaluate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,9 @@ export class EvaluationContext {
334334
} else if (varExpr.name === 't_blob') {
335335
return int(10);
336336
} else if (varExpr.name === 'numbermax') {
337-
return int(Number.MAX_VALUE);
337+
return int(Number.MAX_SAFE_INTEGER);
338338
} else if (varExpr.name === 'numbermin') {
339-
return int(Number.MIN_VALUE);
339+
return int(Number.MIN_SAFE_INTEGER);
340340
} else if (varExpr.name === 'numbersize') {
341341
// NOTE: In VimScript this refers to a 64 bit integer; we have a 64 bit float because JavaScript
342342
return int(64);

0 commit comments

Comments
 (0)