Commit Graph

9945 Commits

Author SHA1 Message Date
Justin M. Keyes
7164f61850
typval_encode.c.h: avoid -Wnonnull-compare warning (#7712)
* typval_encode.c.h: avoid -Wnonnull-compare warning

closes #6847

The NULL check is needed because TYPVAL_ENCODE_CONV_EMPTY_DICT may be
invoked with literal `NULL`.

Warning occurs even for `Debug` build-type:

    neovim/src/nvim/eval/typval.c: In function ‘_typval_encode_nothing_convert_one_value’:
    neovim/src/nvim/eval/typval.c:1802:10: warning: nonnull argument ‘tv’ compared to NULL [-Wnonnull-compare]
           if (tv != NULL) { \
              ^
    ../src/nvim/eval/typval_encode.c.h:398:9: note: in expansion of macro ‘TYPVAL_ENCODE_CONV_EMPTY_DICT’
             TYPVAL_ENCODE_CONV_EMPTY_DICT(tv, tv->vval.v_dict);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

gcc version:
    gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406

* fixup! typval_encode.c.h: avoid -Wnonnull-compare warning
2017-12-13 22:22:02 +01:00
Justin M. Keyes
ed92ece815 tui: defer termcodes using a timer
With this implementation there is no "jank" during startup.

Using the main_loop in any fashion is janky. Using only the TUI loop
emits the termcodes too soon, or requires bad hacks like counting
tui_flush invocations (9 seems to work).

ref #7664
ref #7649
ref #7664
ref 27f9b1c7b0
2017-12-13 22:18:25 +01:00
Justin M. Keyes
6b51c72e0c tui: rework deferred-termcodes implementation
Try another approach to defer the termcodes. Seems less janky, but still
not perfect.

ref #7664
ref #7649
ref #7664
ref 27f9b1c7b0
2017-12-13 22:17:39 +01:00
Justin M. Keyes
6203c23449 pty_process_unix: _exit() on execvp() failure
Mostly cargo-culting based on a reading of the manpages, interwebs, and
the Vim source.
2017-12-13 22:17:38 +01:00
Björn Linse
34057045be
ui: forward relevant option updates to UIs (#7520)
also make termguicolors mutable after startup
2017-12-12 18:23:19 +01:00
ZyX
932ea7a0d1 clint,eval: Make linter check for direct usage of list attributes 2017-12-12 08:43:31 +03:00
James McCoy
f976826690
Merge pull request #7718 from jamessan/disable-titleold-translation
Disable translation of default 'titleold' value
2017-12-11 20:41:16 -05:00
ZyX
45998deb5d *: Fix linter errors 2017-12-12 00:52:14 +03:00
ZyX
1f9dd689b9 Merge branch 'master' into hide-container-impl 2017-12-12 00:44:25 +03:00
James McCoy
ceed29687f Disable translation of default 'titleold' value
It's an empty string, so there's no reason to try to translate it.

Closes #7717
2017-12-11 12:52:38 -05:00
ZyX
9f534422e6 eval/typval: Fix typo
[ci skip]
2017-12-11 11:09:09 +03:00
ZyX
1a961b5750 eval: Fix add() 2017-12-11 10:34:58 +03:00
ZyX
f4132fb38b *: Fix linter errors 2017-12-11 10:19:20 +03:00
ZyX
d46e37cb4c *: Finish hiding list implementation 2017-12-11 10:12:59 +03:00
Justin M. Keyes
8813b29cec
Merge #7555 'vim-patch.sh, doc updates' 2017-12-11 02:12:05 +01:00
Justin M. Keyes
23fb833ea7 vim-patch.sh: remove version.c in generated patch
Vim patch tracking is now driven completely by `vim-patch:xxx` tokens in
the VCS logs. version.c will be auto-generated, if it is used at all.
2017-12-11 00:54:25 +01:00
Justin M. Keyes
56b49955b7 vim-patch.sh: introduce -L 2017-12-11 00:49:44 +01:00
ZyX
ceb45a0885 *: Fix test failures 2017-12-11 01:43:36 +03:00
ZyX
fe55f37083 eval: Still check for NULL when doing :unlet 2017-12-10 23:18:24 +03:00
ZyX
622d355ab4 functests: Add some more NULL tests 2017-12-10 23:16:00 +03:00
ZyX
d11884db49 eval: Fix uniq() crash in legacy test 055 2017-12-10 23:02:19 +03:00
ZyX
7572d5ac5a eval/encode: Fix crash in json_encode test suite 2017-12-10 22:41:00 +03:00
ZyX
0b03ac2cb2 functests: Mark islocked("v:_null_list") behaviour correct
It is the same for other VAR_FIXED lists.
2017-12-10 22:34:32 +03:00
ZyX
83f77c80c0 quickfix: Fix :cexpr and :lexpr 2017-12-10 22:33:05 +03:00
ZyX
5008205a3e eval: Fix setmatches(), setqflist() and setloclist() 2017-12-10 22:28:18 +03:00
ZyX
f572bd7e4e eval,functests: Fix tests and complete() and setline() behaviour 2017-12-10 22:24:11 +03:00
ZyX
ac4bbf55f6 *: Hide list implementation in other files as well 2017-12-10 22:04:43 +03:00
ckelsel
e9504b7fd8 vim-patch: NA
vim-patch:8.0.0299 NA
vim-patch:8.0.0309 NA
vim-patch:8.0.0310 NA

vim-patch:8.0.0215 NA
Problem:    When a Cscope line contains CTRL-L a NULL pointer may be used.
            (Coverity)
Solution:   Don't check for an emacs tag in a cscope line.
e362c3d2c3

vim-patch:8.0.0244 NA
Problem:    When the user sets t_BE empty after startup to disable bracketed
            paste, this has no direct effect.
Solution:   When t_BE is made empty write t_BD.  When t_BE is made non-empty
            write the new value.
d9c60648e5

Some patches were not properly marked in the commit logs. So they are
marked here:

vim-patch:8.0.1230
vim-patch:8.0.1229
vim-patch:8.0.0618
vim-patch:8.0.0104

vim-patch:8.0.0405
vim-patch:8.0.0400
vim-patch:8.0.0302
vim-patch:8.0.0288
vim-patch:8.0.0285
vim-patch:8.0.0284
vim-patch:8.0.0281
vim-patch:8.0.0279
vim-patch:8.0.0278
vim-patch:8.0.0277
vim-patch:8.0.0276
vim-patch:8.0.0273
vim-patch:8.0.0272
vim-patch:8.0.0271
vim-patch:8.0.0270
vim-patch:8.0.0269
vim-patch:8.0.0268
vim-patch:8.0.0267
vim-patch:8.0.0260
vim-patch:8.0.0257
vim-patch:8.0.0249
vim-patch:8.0.0248
vim-patch:8.0.0246
vim-patch:8.0.0244
vim-patch:8.0.0241
vim-patch:8.0.0240
vim-patch:8.0.0239
vim-patch:8.0.0232
vim-patch:8.0.0221
vim-patch:8.0.0217
vim-patch:8.0.0215
vim-patch:8.0.0213
vim-patch:8.0.0211
vim-patch:8.0.0203
vim-patch:8.0.0199
vim-patch:8.0.0193
vim-patch:8.0.0192
vim-patch:8.0.0191
vim-patch:8.0.0187
vim-patch:8.0.0183
vim-patch:8.0.0180
vim-patch:8.0.0173
vim-patch:8.0.0171
vim-patch:8.0.0170
vim-patch:8.0.0169
vim-patch:8.0.0166
vim-patch:8.0.0163
vim-patch:8.0.0162
vim-patch:8.0.0161
vim-patch:8.0.0152
vim-patch:8.0.0145
vim-patch:8.0.0144
vim-patch:8.0.0141
vim-patch:8.0.0139
vim-patch:8.0.0138
vim-patch:8.0.0130
vim-patch:8.0.0129
vim-patch:8.0.0123
vim-patch:8.0.0122
vim-patch:8.0.0120
vim-patch:8.0.0117
vim-patch:8.0.0115
vim-patch:8.0.0114
vim-patch:8.0.0113
vim-patch:8.0.0109
vim-patch:8.0.0108
vim-patch:8.0.0107
vim-patch:8.0.0105
vim-patch:8.0.0103
vim-patch:8.0.0098
vim-patch:8.0.0097
vim-patch:8.0.0095
vim-patch:8.0.0094
vim-patch:8.0.0093
vim-patch:8.0.0089
vim-patch:8.0.0087
vim-patch:8.0.0082
vim-patch:8.0.0080
vim-patch:8.0.0077
vim-patch:8.0.0076
vim-patch:8.0.0072
vim-patch:8.0.0071
vim-patch:8.0.0070
vim-patch:8.0.0067
vim-patch:8.0.0065
vim-patch:8.0.0063
vim-patch:8.0.0061
vim-patch:8.0.0059
vim-patch:8.0.0055
vim-patch:8.0.0054
vim-patch:8.0.0051
vim-patch:8.0.0050
vim-patch:8.0.0048
vim-patch:8.0.0045
vim-patch:8.0.0039
vim-patch:8.0.0036
vim-patch:8.0.0030
vim-patch:8.0.0029
vim-patch:8.0.0028
vim-patch:8.0.0027
vim-patch:8.0.0024
vim-patch:8.0.0022
vim-patch:8.0.0021
vim-patch:8.0.0018
vim-patch:8.0.0016
vim-patch:8.0.0015
vim-patch:8.0.0014
vim-patch:8.0.0013
vim-patch:8.0.0011
vim-patch:8.0.0010
vim-patch:8.0.0009
vim-patch:8.0.0007
vim-patch:8.0.0005
2017-12-10 17:13:22 +01:00
Justin M. Keyes
5bd8827431 vim-patch.sh: always use git log, not version.c 2017-12-10 17:13:22 +01:00
Justin M. Keyes
ad9c2d3cb9 doc
closes #7622
2017-12-10 17:13:22 +01:00
Justin M. Keyes
9ada97a810 gen_api_vimdoc.py: require "nvim_" prefix
Avoids doxygen bugs (things that aren't functions) and other noise (e.g.
`remote_ui_disconnect()` was incorrectly included in api.txt).
2017-12-10 17:13:22 +01:00
Justin M. Keyes
dc232b74fb doc: hack to avoid doxygen bug
Use `@cond <something>` to obscure a section from doxygen.

doxygen thinks kvec_withinit_t() is a function. That adds noise to the
generated API documentation, and also prevents the following function
from being noticed.
2017-12-10 17:13:22 +01:00
James McCoy
6f41ce0260
Merge pull request #7704 from jamessan/mac-lang-fix
mac: Set $LANG based on the system locale
2017-12-10 10:47:13 -05:00
glacambre
abe38f7d26 window.c: do BufEnter in correct window after closing help #7431
closes #7429

Problem: after a help window was closed, a window was selected and its
autocommands triggered. After that, restore_snapshot was called and the
focused window changed, confusing the user.

Solution: Add function get_snapshot_focus() that returns the window that
holds the cursor in a snapshot. Use this function in win_close to make
sure the right window is selected before any autocommand is triggered.
2017-12-10 14:55:59 +01:00
James McCoy
1f2b35860f
mac: Set $LANG based on the system locale
Unix's typical locale-related environment variables aren't always set
appropriately on a Mac.  Instead of relying on them, query the locale
information using Mac specific APIs and then set $LANG appropriately for
the rest of nvim.

Closes #5873
2017-12-10 07:45:04 -05:00
Jan Edmund Lazo
4a5bc6275d ci: run oldtests in Appveyor #7705 2017-12-10 02:45:41 +01:00
ZyX
5c1ddb5078 eval: Fix writefile() 2017-12-10 04:00:54 +03:00
ZyX
21745d72b8 eval: Fix inputlist() 2017-12-10 04:00:54 +03:00
ZyX
274f32d42e *: Start hiding list implementation
Most of files, except for eval.c and eval/* were only processed by perl.
2017-12-10 04:00:52 +03:00
ZyX
49dd615693 eval/typval: Add macros useful for hiding list item implementation 2017-12-10 03:40:34 +03:00
ZyX
ddce5bca03 eval/typval: Add functions useful for hiding list implementation 2017-12-10 03:40:34 +03:00
Justin M. Keyes
3cc7ebf810 Merge #7234 'built-in expression parser' 2017-12-09 18:47:34 +01:00
Jan Edmund Lazo
afae4b5141 ci: Install neovim gem in Appveyor (#7700)
ref #7655
2017-12-07 10:21:03 +01:00
Justin M. Keyes
a58c9094db
Merge #7676 from florolf/atomic-unibilium
closes #7381
2017-12-06 20:51:24 +01:00
Björn Linse
873af01245
Merge pull request #7692 from bfredl/wildcmd
ui: fix glitch with both ext_cmdline and cmd_wildmenu
2017-12-06 19:19:05 +01:00
Justin M. Keyes
b6c268b32a
build: de-parallelize luarocks dependencies (#7697)
ref 6647f3c047
closes #7535
2017-12-06 14:14:07 +01:00
Justin M. Keyes
5cbd3b383c tui: ignore st terminfo cursor shape (Se, Ss) entries
closes #7641
2017-12-06 11:03:43 +01:00
Björn Linse
ba7d6a9e6b ui: fix glitch with both ext_cmdline and cmd_wildmenu 2017-12-06 09:41:51 +01:00
Florian Larysch
54087d80f3 tui: always hide cursor when flushing
The previous commit ensures that we can never flush the buffer in a
state where toggling cursor visibility can corrupt other escape codes.
Thus, we can remove the workaround added as part of e838452, simplyfing
the code and hiding the cursor on more occasions.
2017-12-05 21:40:37 +01:00
Florian Larysch
90dd2b1473 tui: never flush buffers in midst of unibilium output
e83845285 fixed an issue where long (true color) escape sequences got
interrupted by the cursor visibility toggling caused by buffer flushes.

cdfaecb25 introduces a new issue which causes similar problems: While
the old buffer flushing code appended the cursor visibility escapes to
the buffer before/after flushing, the new code effectively prepends the
sequences.

Assume the following sequence of events occurs:

 - A long escape code is issued using unibi_out when the buffer is
   almost full
 - out() gets called for a prefix of that escape code, causing the
   buffer to fill up
 - flush_buf(ui, false) is called and (correctly) does not insert any
   cursor toggling escapes
 - The rest of the escape code is written into the now empty buffer
 - At some later point, some other part of nvim calls flush_buf(ui,
   true), which then toggles the cursor, corrupting the escape code

This could possibly also be fixed by tracking the state of the buffer
(i.e. does it contain a partially output escape code?), but this seems
fragile in the same way e83845285 turned out to be.

The root cause for all these problems is the mismatch between nvim's
(implicit) assumption that the buffer is flushable at any point in time
and the non-atomicity of unibilium's character based callback interface.
The proper fix (without modifying unibilium) is to ensure nvim's
assumption about the buffer state holds at all times.

To that end, add a "cork" flag which ensures one unibi_out-call never
splits its output across a buffer flush; if an escape code does not fit
into the current buffer, flush it without any part of the escape code in
it and insert the whole escape code in the emptied buffer. This is a
little more complex because it modifies the buffer in place rather than
printing into another buffer, checking the remaining space in the
terminal buffer and then memcpy'ing it.
2017-12-05 21:40:37 +01:00