aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2016-11-16 11:09:04 -0500
committerJames McCoy <jamessan@jamessan.com>2017-06-04 22:12:13 -0400
commit81be7358be00d3d75453659bcdc7efc69207ca8e (patch)
tree9dc19a6e3bda44c63ab678292d498d1b2f504c81 /runtime
parent953f26bace041f481e79b67b64401aa07259055c (diff)
downloadrneovim-81be7358be00d3d75453659bcdc7efc69207ca8e.tar.gz
rneovim-81be7358be00d3d75453659bcdc7efc69207ca8e.tar.bz2
rneovim-81be7358be00d3d75453659bcdc7efc69207ca8e.zip
vim-patch:7.4.1976
Problem: Number variables are not 64 bits while they could be. Solution: Add the num64 feature. (Ken Takata) https://github.com/vim/vim/commit/22fcfad29276bd5f317faf516637dcd491b96a12
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt23
-rw-r--r--runtime/doc/various.txt1
2 files changed, 19 insertions, 5 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 11b42dd2e5..47f8414285 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -22,6 +22,8 @@ done, the features in this document are not available. See |+eval| and
There are six types of variables:
Number A 32 or 64 bit signed number. |expr-number| *Number*
+ 64-bit Number is available only when compiled with the
+ |+num64| feature.
Examples: -123 0x10 0177 0b1011
Float A floating point number. |floating-point-format| *Float*
@@ -887,6 +889,11 @@ When dividing a Number by zero the result depends on the value:
<0 / 0 = -0x7fffffff (like negative infinity)
(before Vim 7.2 it was always 0x7fffffff)
+When 64-bit Number support is enabled:
+ 0 / 0 = -0x8000000000000000 (like NaN for Float)
+ >0 / 0 = 0x7fffffffffffffff (like positive infinity)
+ <0 / 0 = -0x7fffffffffffffff (like negative infinity)
+
When the righthand side of '%' is zero, the result is 0.
None of these work for |Funcref|s.
@@ -3536,17 +3543,19 @@ float2nr({expr}) *float2nr()*
decimal point.
{expr} must evaluate to a |Float| or a Number.
When the value of {expr} is out of range for a |Number| the
- result is truncated to 0x7fffffff or -0x7fffffff. NaN results
- in -0x80000000.
+ result is truncated to 0x7fffffff or -0x7fffffff (or when
+ 64-bit Number support is enabled, 0x7fffffffffffffff or
+ -0x7fffffffffffffff. NaN results in -0x80000000 (or when
+ 64-bit Number support is enabled, -0x8000000000000000).
Examples: >
echo float2nr(3.95)
< 3 >
echo float2nr(-23.45)
< -23 >
echo float2nr(1.0e100)
-< 2147483647 >
+< 2147483647 (or 9223372036854775807) >
echo float2nr(-1.0e150)
-< -2147483647 >
+< -2147483647 (or -9223372036854775807) >
echo float2nr(1.0e-100)
< 0
@@ -7983,7 +7992,10 @@ winwidth({nr}) *winwidth()*
:if winwidth(0) <= 50
: exe "normal 50\<C-W>|"
:endif
-<
+< For getting the terminal or screen size, see the 'columns'
+ option.
+
+
wordcount() *wordcount()*
The result is a dictionary of byte/chars/word statistics for
the current buffer. This is the same info as provided by
@@ -8137,6 +8149,7 @@ mouseshape Compiled with support for 'mouseshape'.
multi_byte Compiled with support for 'encoding'
multi_byte_encoding 'encoding' is set to a multi-byte encoding.
multi_lang Compiled with support for multiple languages.
+num64 Compiled with 64-bit |Number| support.
nvim This is Nvim. |has-patch|
path_extra Compiled with up/downwards search in 'path' and 'tags'
persistent_undo Compiled with support for persistent undo history.
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index 2679c2dabb..8880b625e9 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -352,6 +352,7 @@ N *+mouseshape* |'mouseshape'|
N *+multi_byte* 16 and 32 bit characters |multibyte|
*+multi_byte_ime* Win32 input method for multibyte chars |multibyte-ime|
N *+multi_lang* non-English language support |multi-lang|
+ *+num64* 64-bit Number support |Number|
N *+path_extra* Up/downwards search in 'path' and 'tags'
N *+persistent_undo* Persistent undo |undo-persistence|
*+postscript* |:hardcopy| writes a PostScript file