Skip to content

Commit 1f8072e

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 3d4ef0c + c41badb commit 1f8072e

112 files changed

Lines changed: 1984 additions & 874 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Filelist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ SRC_ALL = \
6868
src/fileio.c \
6969
src/filepath.c \
7070
src/findfile.c \
71+
src/float.c \
7172
src/fold.c \
7273
src/getchar.c \
7374
src/globals.h \
@@ -246,6 +247,7 @@ SRC_ALL = \
246247
src/proto/fileio.pro \
247248
src/proto/filepath.pro \
248249
src/proto/findfile.pro \
250+
src/proto/float.pro \
249251
src/proto/fold.pro \
250252
src/proto/getchar.pro \
251253
src/proto/gui.pro \

runtime/doc/eval.txt

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2606,10 +2606,12 @@ getbufline({expr}, {lnum} [, {end}])
26062606
getbufvar({expr}, {varname} [, {def}])
26072607
any variable {varname} in buffer {expr}
26082608
getchangelist([{expr}]) List list of change list items
2609-
getchar([expr]) Number get one character from the user
2609+
getchar([expr]) Number or String
2610+
get one character from the user
26102611
getcharmod() Number modifiers for the last typed character
26112612
getcharpos({expr}) List position of cursor, mark, etc.
26122613
getcharsearch() Dict last character search
2614+
getcharstr([expr]) String get one character from the user
26132615
getcmdline() String return the current command-line
26142616
getcmdpos() Number return cursor position in command-line
26152617
getcmdtype() String return current command-line type
@@ -5244,6 +5246,7 @@ getchar([expr]) *getchar()*
52445246
Return zero otherwise.
52455247
If [expr] is 1, only check if a character is available, it is
52465248
not consumed. Return zero if no character available.
5249+
If you prefer always getting a string use |getcharstr()|.
52475250

52485251
Without [expr] and when [expr] is 0 a whole character or
52495252
special key is returned. If it is a single character, the
@@ -5369,6 +5372,20 @@ getcharsearch() *getcharsearch()*
53695372
:nnoremap <expr> , getcharsearch().forward ? ',' : ';'
53705373
< Also see |setcharsearch()|.
53715374

5375+
5376+
getcharstr([expr]) *getcharstr()*
5377+
Get a single character from the user or input stream as a
5378+
string.
5379+
If [expr] is omitted, wait until a character is available.
5380+
If [expr] is 0 or false, only get a character when one is
5381+
available. Return an empty string otherwise.
5382+
If [expr] is 1 or true, only check if a character is
5383+
available, it is not consumed. Return an empty string
5384+
if no character is available.
5385+
Otherwise this works like |getchar()|, except that a number
5386+
result is converted to a string.
5387+
5388+
53725389
getcmdline() *getcmdline()*
53735390
Return the current command-line. Only works when the command
53745391
line is being edited, thus requires use of |c_CTRL-\_e| or

runtime/doc/usr_41.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,7 @@ Interactive: *interactive-functions*
952952
browsedir() put up a directory requester
953953
confirm() let the user make a choice
954954
getchar() get a character from the user
955+
getcharstr() get a character from the user as a string
955956
getcharmod() get modifiers for the last typed character
956957
getmousepos() get last known mouse position
957958
echoraw() output characters as-is

runtime/filetype.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1496,7 +1496,7 @@ au BufNewFile,BufRead *.sass setf sass
14961496
au BufNewFile,BufRead *.sa setf sather
14971497

14981498
" Scala
1499-
au BufNewFile,BufRead *.scala setf scala
1499+
au BufNewFile,BufRead *.scala,*.sc setf scala
15001500

15011501
" SBT - Scala Build Tool
15021502
au BufNewFile,BufRead *.sbt setf sbt

src/Make_ami.mak

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ SRC += \
117117
fileio.c \
118118
filepath.c \
119119
findfile.c \
120+
float.c \
120121
fold.c \
121122
getchar.c \
122123
hardcopy.c \

src/Make_cyg_ming.mak

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,7 @@ OBJ = \
749749
$(OUTDIR)/fileio.o \
750750
$(OUTDIR)/filepath.o \
751751
$(OUTDIR)/findfile.o \
752+
$(OUTDIR)/float.o \
752753
$(OUTDIR)/fold.o \
753754
$(OUTDIR)/getchar.o \
754755
$(OUTDIR)/gui_xim.o \

src/Make_mvc.mak

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,7 @@ OBJ = \
743743
$(OUTDIR)\fileio.obj \
744744
$(OUTDIR)\filepath.obj \
745745
$(OUTDIR)\findfile.obj \
746+
$(OUTDIR)\float.obj \
746747
$(OUTDIR)\fold.obj \
747748
$(OUTDIR)\getchar.obj \
748749
$(OUTDIR)\gui_xim.obj \
@@ -1599,6 +1600,8 @@ $(OUTDIR)/filepath.obj: $(OUTDIR) filepath.c $(INCL)
15991600

16001601
$(OUTDIR)/findfile.obj: $(OUTDIR) findfile.c $(INCL)
16011602

1603+
$(OUTDIR)/float.obj: $(OUTDIR) float.c $(INCL)
1604+
16021605
$(OUTDIR)/fold.obj: $(OUTDIR) fold.c $(INCL)
16031606

16041607
$(OUTDIR)/getchar.obj: $(OUTDIR) getchar.c $(INCL)
@@ -1935,6 +1938,7 @@ proto.h: \
19351938
proto/fileio.pro \
19361939
proto/filepath.pro \
19371940
proto/findfile.pro \
1941+
proto/float.pro \
19381942
proto/getchar.pro \
19391943
proto/gui_xim.pro \
19401944
proto/hardcopy.pro \

src/Make_vms.mms

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ SRC = \
343343
fileio.c \
344344
filepath.c, \
345345
findfile.c \
346+
float.c \
346347
fold.c \
347348
getchar.c \
348349
gui_xim.c \
@@ -460,6 +461,7 @@ OBJ = \
460461
fileio.obj \
461462
filepath.obj \
462463
findfile.obj \
464+
float.obj \
463465
fold.obj \
464466
getchar.obj \
465467
gui_xim.obj \
@@ -860,6 +862,9 @@ findfile.obj : findfile.c vim.h [.auto]config.h feature.h os_unix.h \
860862
ascii.h keymap.h term.h macros.h structs.h regexp.h \
861863
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
862864
errors.h globals.h
865+
float.obj : float.c vim.h [.auto]config.h feature.h os_unix.h \
866+
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
867+
[.proto]gui_beval.pro option.h ex_cmds.h proto.h errors.h globals.h
863868
fold.obj : fold.c vim.h [.auto]config.h feature.h os_unix.h \
864869
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
865870
[.proto]gui_beval.pro option.h ex_cmds.h proto.h errors.h globals.h

src/Makefile

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,8 @@ CClink = $(CC)
386386
# Select the architecture supported. Default is to build for the current
387387
# platform. Use "both" for a universal binary. That probably doesn't work
388388
# when including Perl, Python, etc.
389-
#CONF_OPT_DARWIN = --with-mac-arch=i386
389+
# NOTE: ppc probably doesn't work anymore,
390+
#CONF_OPT_DARWIN = --with-mac-arch=intel
390391
#CONF_OPT_DARWIN = --with-mac-arch=ppc
391392
#CONF_OPT_DARWIN = --with-mac-arch=both
392393

@@ -436,6 +437,8 @@ CClink = $(CC)
436437
# PYTHON
437438
# Uncomment lines here when you want to include the Python interface.
438439
# This requires at least "normal" features, "tiny" and "small" don't work.
440+
# Python 3 is preferred, Python 2 (often referred to as "Python") has been
441+
# deprecated for a long time.
439442
# NOTE: This may cause threading to be enabled, which has side effects (such
440443
# as using different libraries and debugging becomes more difficult).
441444
# For Python3 support make a symbolic link in /usr/local/bin:
@@ -690,16 +693,18 @@ LINT_OPTIONS = -beprxzF
690693
# PROFILE_CFLAGS=-g -O0 --coverage -DWE_ARE_PROFILING -DUSE_GCOV_FLUSH
691694

692695

693-
# Uncomment one of the next two lines to compile Vim with the
694-
# address sanitizer (asan) or with the undefined sanitizer. Works with gcc.
696+
# Uncomment the next lines to compile Vim with the address sanitizer (asan) and
697+
# with the undefined sanitizer. Works with gcc.
698+
# You should also use -DEXITFREE to avoid false reports.
695699
# May make Vim twice as slow. Errors are reported on stderr.
696700
# More at: https://code.google.com/p/address-sanitizer/
697701
# Useful environment variables:
698702
# $ export ASAN_OPTIONS="print_stacktrace=1 log_path=asan"
699703
# $ export LSAN_OPTIONS="suppressions=`pwd`/testdir/lsan-suppress.txt"
700704
# When running tests output can be found in testdir/asan.*
701-
#SANITIZER_CFLAGS = -g -O0 -fsanitize=address -fno-omit-frame-pointer
702-
#SANITIZER_CFLAGS = -g -O0 -fsanitize=undefined -fno-omit-frame-pointer
705+
#SANITIZER_CFLAGS = -g -O0 -fsanitize-recover=all \
706+
# -fsanitize=address -fsanitize=undefined \
707+
# -fno-omit-frame-pointer
703708

704709
# Similarly when compiling with clang and using ubsan.
705710
# $ export UBSAN_OPTIONS="print_stacktrace=1 log_path=ubsan"
@@ -979,7 +984,7 @@ SANITIZER_LIBS = $(SANITIZER_CFLAGS)
979984

980985
# The value of QUOTESED comes from auto/config.mk.
981986
# Uncomment the next line to use the default value.
982-
# QUOTESED = sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$$/";/'
987+
# QUOTESED = sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$$/";/' -e 's/ */ /g'
983988

984989
##################### end of system specific lines ################### }}}
985990

@@ -1638,6 +1643,7 @@ BASIC_SRC = \
16381643
fileio.c \
16391644
filepath.c \
16401645
findfile.c \
1646+
float.c \
16411647
fold.c \
16421648
getchar.c \
16431649
gui_xim.c \
@@ -1792,6 +1798,7 @@ OBJ_COMMON = \
17921798
objects/fileio.o \
17931799
objects/filepath.o \
17941800
objects/findfile.o \
1801+
objects/float.o \
17951802
objects/fold.o \
17961803
objects/getchar.o \
17971804
objects/gui_xim.o \
@@ -1962,6 +1969,7 @@ PRO_AUTO = \
19621969
fileio.pro \
19631970
filepath.pro \
19641971
findfile.pro \
1972+
float.pro \
19651973
fold.pro \
19661974
getchar.pro \
19671975
gui_xim.pro \
@@ -3270,6 +3278,9 @@ objects/filepath.o: filepath.c
32703278
objects/findfile.o: findfile.c
32713279
$(CCC) -o $@ findfile.c
32723280

3281+
objects/float.o: float.c
3282+
$(CCC) -o $@ float.c
3283+
32733284
objects/fold.o: fold.c
32743285
$(CCC) -o $@ fold.c
32753286

@@ -3913,6 +3924,10 @@ objects/findfile.o: findfile.c vim.h protodef.h auto/config.h feature.h os_unix.
39133924
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
39143925
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
39153926
proto.h errors.h globals.h
3927+
objects/float.o: float.c vim.h protodef.h auto/config.h feature.h \
3928+
os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
3929+
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
3930+
proto.h errors.h globals.h
39163931
objects/fold.o: fold.c vim.h protodef.h auto/config.h feature.h os_unix.h \
39173932
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
39183933
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \

src/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ locale.c | locale/language handling
5656
map.c | mapping and abbreviations
5757
mark.c | marks
5858
match.c | highlight matching
59+
float.c | floating point functions
5960
mbyte.c | multi-byte character handling
6061
memfile.c | storing lines for buffers in a swapfile
6162
memline.c | storing lines for buffers in memory

0 commit comments

Comments
 (0)