Commit Graph

7961 Commits

Author SHA1 Message Date
James McCoy
a7569b50b7 Merge pull request #6338 from jamessan/llvm-update
Bump LLVM to 3.9
2017-04-01 20:09:26 -04:00
Justin M. Keyes
1ad5644006 Merge #6409 from ZyX-I/separate-clint
cmake: Add `clint` target to build Makefile
2017-04-02 01:20:16 +02:00
James McCoy
16babc6687 tui: Only enable/disable mouse when there's something to do (#6411)
If we get a mouse_on/mouse_off event, but the mouse is already in the
corresponding state, there's no need to send the event up to the
terminal.

Closes #4394
2017-04-02 00:00:42 +02:00
Justin M. Keyes
518f28f537 Merge #6422 from ZyX-I/fix-6420
eval,fileio: Omit additional fsync() call
2017-04-01 22:38:20 +02:00
Matthew Malcomson
337b6179df 'pastetoggle': support value >1 char (#6421)
If we `set pastetoggle=abcde`, and manually type it, then `vgetorpeek()`
sees part of the option before it has all been inserted into the
typebuffer.
To signify this it sets `keylen = KEYLEN_PART_KEY`, but the condition
about whether to return the current key from `vgetorpeek()` only checks
for `keylen = KEYLEN_PART_MAP`.
Add a check for `KEYLEN_PART_KEY` to account for the `'pastetoggle'`
option.
2017-04-01 21:50:29 +02:00
ZyX
19690d4a25 eval: Do not allocate FileDescriptor 2017-04-01 22:26:50 +03:00
Justin M. Keyes
0f6608d039 Merge #6418 from ZyX-I/better-unittests 2017-04-01 20:48:03 +02:00
ZyX
cc4523013f eval,fileio: Omit additional fsync() call
Fixes #6420
2017-04-01 21:15:13 +03:00
ZyX
ac22238b6a unittests: Replace two environment variables with one TRACE_LEVEL 2017-04-01 20:57:23 +03:00
Justin M. Keyes
33ff29fc74 Merge #6344 'vim-patch:7.4.2236,7.4.2306' 2017-04-01 17:42:15 +02:00
lonerover
45a13c4bbc vim-patch:7.4.2306
Problem:    Default value for 'langremap' is wrong.
Solution:   Set the right value. (Jürgen Krämer)  Add a test.

da9ce2cde1
2017-04-01 22:46:27 +08:00
lonerover
53da57d27a vim-patch:7.4.2236
Problem:    The 'langnoremap' option leads to double negatives.  And it does
            not work for the last character of a mapping.
Solution:   Add 'langremap' with the opposite value.  Keep 'langnoremap' for
            backwards compatibility.  Make it work for the last character of a
            mapping.  Make the test work.

920694c1b6
2017-04-01 22:45:36 +08:00
ZyX
2d158dde02 unittests: Fix linter error 2017-04-01 13:17:25 +03:00
ZyX
708a55ee15 unittests: Disable non-C-calls
Some benchmarks:

TRACE_EVERYTHING: 79.45s user 12.68s system 124% cpu 1:13.94  total

(default):        30.26s user  5.30s system  89% cpu   39.663 total
2017-04-01 13:16:25 +03:00
ZyX
9dd0d4f8b9 unittests: Add trace description right to the error message 2017-04-01 12:52:28 +03:00
ZyX
046d6a8dfe unittests: Collect traces
Some benchmarks:

MAIN_CDEFS + NO_TRACE:  3.81s user  1.65s system  33% cpu   16.140 total

MAIN_CDEFS:            73.61s user 10.98s system 154% cpu   54.690 total

NO_TRACE:              18.49s user  4.30s system  73% cpu   30.804 total

(default):             77.11s user 14.74s system 126% cpu 1:12.79  total
2017-04-01 12:25:10 +03:00
ZyX
8f7a48f46a unittests: Split itp implementation into multiple functions 2017-04-01 11:19:41 +03:00
ZyX
933d60bc23 unittests: Do not hang when error message is too long 2017-04-01 11:07:08 +03:00
Justin M. Keyes
8de53157b6 build: avoid cmake warning (#6417) 2017-04-01 03:22:56 +02:00
ZyX
6ddaace7ac ci: Do not shift if there are not enough arguments 2017-03-31 20:52:05 +03:00
ZyX
86f5b1276b ci: Add test watchdog and tracing for lint tests 2017-03-31 19:42:18 +03:00
ZyX
929c398aab ci: Enable tracing 2017-03-31 19:09:18 +03:00
ZyX
d9069b9fe4 ci: Check for exact value of CI_TARGET, not its emptyness 2017-03-31 17:39:18 +03:00
James McCoy
4bae3f48fe ci: Bump clang version to 3.9 2017-03-31 10:03:43 -04:00
James McCoy
1b276be6e5 ci: Use LLVM's trusty repo to match Travis' Ubuntu version 2017-03-31 10:03:43 -04:00
ZyX
4c20733f6b ci: Add ${NL} variable 2017-03-31 16:19:47 +03:00
ZyX
2da3caef1b ci: Do not quote MAKE_CMD 2017-03-31 16:17:38 +03:00
ZyX
1e87061294 makefile: Make lint target depend on clint 2017-03-31 16:08:02 +03:00
ZyX
2bf9d36ccd ci: Refactor CI scripts
1. CI_TARGET now determines which run_${CI_TARGET}.sh script to use. Defaults to
   `tests`.
2. Build no longer halts on the first failing suit: e.g. if functional tests
   failed it will continue with unit tests, etc.
3. All ${MAKE_CMD} occurrences moved to `top_make` function, added `build_make`
   as an alias to `make -C build` (`"${MAKE_CMD}" -C "${BUILD_DIR}"`) which is
   too verbose.

`suite.sh` was copied from powerline (tests/common.sh file), assumes running
with POSIX shells (and actually uses dash in powerline). Then some convenience
functions were added (run_test and below).
2017-03-31 16:06:17 +03:00
ZyX
4d0f90f94d cmake: Also depend on LINT_PRG 2017-03-31 16:04:18 +03:00
ZyX
4fc2be490c clint: Do not report zero errors 2017-03-31 16:04:18 +03:00
ZyX
c61858a997 cmake: Replace RunLint.cmake with code in src/nvim/CMakeLists.txt
This also removes LINT_FILE environment variable, other then that functionality 
is kept. It is expected that developers needing partial linting will use `make 
lint`, touching interesting file before (if not done already by writing to 
them).
2017-03-31 16:04:18 +03:00
ZyX
24fd125893 cmake: Allow failing to download small suppress files 2017-03-31 16:04:18 +03:00
ZyX
8204eaea7f cmake: Make Download.cmake check for errors
Copying from third-party/cmake/DownloadAndExtractFile.cmake.
2017-03-31 16:04:17 +03:00
ZyX
0b528fc4b5 cmake: Use file-specific supprresses
`make -C build clint` time is now

    make -j5 clint  95.29s user 1.86s system 409% cpu 23.751 total

*without* downloading anything (much worse if something was not cached, still 
a bit better then top-level `make clint`). But since without neovim/bot-ci#95 it 
is downloading each file one-by-one total time with download (download also 
parallel!) is

    make -j5 -B clint  99.29s user 2.98s system 258% cpu 39.634 total

Top-level makefile still gives

    make -j5 clint  59.33s user 0.28s system 95% cpu 1:02.41 total
2017-03-31 16:04:17 +03:00
ZyX
030c0588a0 cmake: Add clint target to build Makefile
Allows linting only modified files and linting multiple files in
parallel. In the current state is rather slow because errors.json is
a 6 MiB file and needs to be reparsed each time.

Results on my system (6-core):

    # In build dir, actually parallel
    make -j5 clint  241.24s user 8.39s system 334% cpu 1:14.74 total
    # In root, one process
    make -j5 clint  60.69s user 0.37s system 93% cpu 1:05.19 total

In both cases download time included.

That is not well for travis (though I would keep travis as-is because
new variant will fail before checking all files), but already good
enough for regular development: total times are nearly identical and
this is the *full* build, further `make -C build clint` will check only
modified files.
2017-03-31 16:04:17 +03:00
Nikolai Aleksandrovich Pavlov
a1c928e70c ci: Do not hide ci directory (#6410) 2017-03-31 14:32:58 +02:00
James McCoy
77539eef9b Merge pull request #6397 from jamessan/coverity
Fix latest Coverity issues
2017-03-31 07:52:45 -04:00
James McCoy
1097ba53f8 Merge pull request #6406 from jamessan/msgpack-c-2.1.x-compat
Add handling for MSGPACK_OBJECT_FLOAT{32,64}
2017-03-31 07:51:38 -04:00
James McCoy
338da727cd
coverity/161216: Ensure buf is valid for lifetime of defstr
Depending on the type of argument for input()/inputdialog()'s {text}
argument, defstr may point to buf.  Therefore it needs to be in scope
for the lifetime of defstr.

Also, use a different buffer for the handling of the 3rd argument to
input()/inputdialog().  Although the buffer defstr points to is used
immediately, it avoids potential mishaps if the code changes.
2017-03-30 22:30:02 -04:00
James McCoy
193aa4c140
third-party: Avoid building msgpack-c examples 2017-03-30 21:35:37 -04:00
James McCoy
f4a3a96b68
Add handling for MSGPACK_OBJECT_FLOAT{32,64}
msgpack-c previously only had MSGPACK_OBJECT_FLOAT, which was a 64-bit
value.  Now, 32-bit and 64-bit floats are supported as distinct types,
but we'll simply continue to treat everything as 64-bit types.
2017-03-30 21:35:36 -04:00
James McCoy
af2ee9c5d1
cmake: Detect whether msgpack-c has MSGPACK_OBJECT_FLOAT{32,64} types 2017-03-30 21:35:36 -04:00
James McCoy
d92add8a4b
third-party: Bump msgpack-c to 2.1.1 2017-03-30 21:35:29 -04:00
Matthew Malcomson
3a9dd13f9e fold.c: more edge-cases when updating (#6207)
When foldUpdateIEMSRecurse() re-uses an existing fold, it misses the
case where the existing fold spans from before startlnum to after
firstlnum, the new fold does not span this range, and there is no
"forced start" of a fold. We add a case for this in.

Ensure that if there was no forced break in folds, we merge folds that
now touch each other.

Include testing for a tricky foldmethod=expr case that has never been a
bug. This case works at the moment because of some effects that are not
obvious when reading the code.
A test for this could be useful to ensure a regression doesn't happen.

vim-patch:8.0.0408
2017-03-31 01:21:26 +02:00
Michael Ennen
831eb2a9bf vim-patch:7.4.2104 (#6332)
Problem:    Code duplication when unreferencing a function.
Solution:   De-duplicate.

97baee80f0
2017-03-31 01:07:39 +02:00
Jakob Schnitzer
eb0e94f71b api: {get,set}_option should {get,set} global value of local options (#6405)
- nvim_get_option should return the global default of a local option.
- nvim_set_option should set the global default of a local option.
2017-03-30 22:03:52 +02:00
Matthew Malcomson
66b336d89b test: set 'nomore' by default (#6360)
Escaping from a '-- More --' prompt in tests is awkward as it doesn't
take keys from the typebuffer, requiring a call to `feed()` in lua at
the correct time. Moreover, it's rarer that a test will want the
'-- More --' prompt to be activated than not.
2017-03-30 19:00:34 +02:00
James McCoy
75b98f7c3f Remove PVS-Studio cruft
[ci skip]
2017-03-30 10:09:33 -04:00
Justin M. Keyes
8d13955328 Merge #6395 'test: Use workspace-local temp directory.' 2017-03-30 03:50:17 +02:00