Mercurial > vim
comparison src/spell.c @ 7447:ad432f8f68fb v7.4.1027
commit https://github.com/vim/vim/commit/887c1fea4a114e7170091942d0446c8882701b5b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 2 17:56:35 2016 +0100
patch 7.4.1027
Problem: No support for binary numbers.
Solution: Add "bin" to nrformats. (Jason Schulz)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 02 Jan 2016 18:00:05 +0100 |
parents | 1e621b31948b |
children | a64793340689 |
comparison
equal
deleted
inserted
replaced
7446:a67ee44e5848 | 7447:ad432f8f68fb |
---|---|
1045 /* A number is always OK. Also skip hexadecimal numbers 0xFF99 and | 1045 /* A number is always OK. Also skip hexadecimal numbers 0xFF99 and |
1046 * 0X99FF. But always do check spelling to find "3GPP" and "11 | 1046 * 0X99FF. But always do check spelling to find "3GPP" and "11 |
1047 * julifeest". */ | 1047 * julifeest". */ |
1048 if (*ptr >= '0' && *ptr <= '9') | 1048 if (*ptr >= '0' && *ptr <= '9') |
1049 { | 1049 { |
1050 if (*ptr == '0' && (ptr[1] == 'x' || ptr[1] == 'X')) | 1050 if (*ptr == '0' && (ptr[1] == 'b' || ptr[1] == 'B')) |
1051 mi.mi_end = skipbin(ptr + 2); | |
1052 else if (*ptr == '0' && (ptr[1] == 'x' || ptr[1] == 'X')) | |
1051 mi.mi_end = skiphex(ptr + 2); | 1053 mi.mi_end = skiphex(ptr + 2); |
1052 else | 1054 else |
1053 mi.mi_end = skipdigits(ptr); | 1055 mi.mi_end = skipdigits(ptr); |
1054 nrlen = (int)(mi.mi_end - ptr); | 1056 nrlen = (int)(mi.mi_end - ptr); |
1055 } | 1057 } |
15610 /* Create a new empty buffer in a new window. */ | 15612 /* Create a new empty buffer in a new window. */ |
15611 do_cmdline_cmd((char_u *)"new"); | 15613 do_cmdline_cmd((char_u *)"new"); |
15612 | 15614 |
15613 /* enable spelling locally in the new window */ | 15615 /* enable spelling locally in the new window */ |
15614 set_option_value((char_u*)"spell", TRUE, (char_u*)"", OPT_LOCAL); | 15616 set_option_value((char_u*)"spell", TRUE, (char_u*)"", OPT_LOCAL); |
15615 set_option_value((char_u*)"spl", dummy, spl, OPT_LOCAL); | 15617 set_option_value((char_u*)"spl", dummy, spl, OPT_LOCAL); |
15616 vim_free(spl); | 15618 vim_free(spl); |
15617 | 15619 |
15618 if (!bufempty() || !buf_valid(curbuf)) | 15620 if (!bufempty() || !buf_valid(curbuf)) |
15619 return; | 15621 return; |
15620 | 15622 |