aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/charset.h
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2021-05-22 19:44:53 +0100
committerSean Dewar <seandewar@users.noreply.github.com>2021-09-11 15:33:20 +0100
commit6617629ad6eceeb77d49633780a7213eeb17a2c9 (patch)
tree9788c7d628daf61d19466d64d1bdec9279b3dc39 /src/nvim/charset.h
parentdda977f5c4d2fc81a0582fbaec7a6397aaf7aebf (diff)
downloadrneovim-6617629ad6eceeb77d49633780a7213eeb17a2c9.tar.gz
rneovim-6617629ad6eceeb77d49633780a7213eeb17a2c9.tar.bz2
rneovim-6617629ad6eceeb77d49633780a7213eeb17a2c9.zip
vim-patch:8.1.2035: recognizing octal numbers is confusing
Problem: Recognizing octal numbers is confusing. Solution: Introduce scriptversion 4: do not use octal and allow for single quote inside numbers. https://github.com/vim/vim/commit/60a8de28d11595f4df0419ece8afa7d6accc9fbd :scriptversion is N/A. Cherry-pick Test_readfile_binary() from v8.1.0742. Note that this patch was missing vim_str2nr() changes, and so fails the tests; this was fixed in v8.1.2036.
Diffstat (limited to 'src/nvim/charset.h')
-rw-r--r--src/nvim/charset.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/charset.h b/src/nvim/charset.h
index e657ce19b6..b5f1f8506b 100644
--- a/src/nvim/charset.h
+++ b/src/nvim/charset.h
@@ -27,9 +27,11 @@ typedef enum {
///
/// STR2NR_FORCE|STR2NR_DEC is actually not different from supplying zero
/// as flags, but still present for completeness.
- STR2NR_FORCE = (1 << 3),
+ STR2NR_FORCE = (1 << 7),
/// Recognize all formats vim_str2nr() can recognize.
STR2NR_ALL = STR2NR_BIN | STR2NR_OCT | STR2NR_HEX,
+ STR2NR_NO_OCT = STR2NR_BIN | STR2NR_HEX, ///< Disallow octal numbers.
+ STR2NR_QUOTE = (1 << 4), ///< Ignore embedded single quotes.
} ChStr2NrFlags;
#ifdef INCLUDE_GENERATED_DECLARATIONS