Commit Graph

11239 Commits

Author SHA1 Message Date
Justin M. Keyes
ef86aad878 log.c: ISO 8601 date/time
After:
    INFO  2018-07-17T22:05:46.175 656 main:560: starting main loop
2018-07-24 19:36:38 +02:00
Justin M. Keyes
3258c6a2f4 log.c: include milliseconds
closes #8727

Before:
    INFO  180711.233956 11124 main:560: starting main loop
After:
    INFO  180711.233956.807 11124 main:560: starting main loop

Note:
  - Can't use uv_hrtime() nor uv_now(), they are not "since the epoch".
    Also, log.c can't assume a loop exists.
2018-07-24 19:36:38 +02:00
Justin M. Keyes
4d6a1e5566 log.c: message format
- Log-level name (INFO/ERROR/…) should be in the first column, so that
  filtering by log-level is maximally trivial.
- Use 2-digit year. 4-digit year is useless, logs don't survive for
  decades without context.

Before:
    2018/07/05 17:49:41 INFO  27596 on_process_exit:393: foo
After:
    INFO  180705.174941 27596 on_process_exit:393: foo
2018-07-24 19:25:51 +02:00
Justin M. Keyes
ddea519542 rename: os_get_localtime => os_localtime 2018-07-24 19:25:50 +02:00
Björn Linse
72ddbb675f
Merge pull request #8771 from bfredl/glitches
Fix redraw glitches with newgrid refactor

Fixes #8768 #8775
2018-07-24 17:45:42 +02:00
Björn Linse
dcac926ced ui: fix glitches where scrolling region affects clearing of screen
the first implemented UI protocol clients (python-gui and builitin TUI)
allowed the cleared region to be restricted by setting the scroll region.
This was never used by nvim though, and not documented and implemented by
newer clients, to check we remain compatible with both kind of clients,
ensure the scroll region is in a reset state.
2018-07-24 16:38:51 +02:00
Björn Linse
d545413492 screen.c: fix redrawing tabline when messages overflow screen 2018-07-24 16:38:24 +02:00
Björn Linse
11861bc9c8 tests: add test for switching tabpage right after scroll 2018-07-24 16:37:48 +02:00
Björn Linse
d183103b45 test: assert scroll region state for clear
some clients assume this, so tests should check it
2018-07-24 16:37:04 +02:00
Björn Linse
ed5ac84ab0 tests: test for redrawing tabline when msgsep marker goes outside screen 2018-07-24 16:36:20 +02:00
zhou13
c8e7a447c5 build: Enable LTO (Link Time Optimization) #8654 2018-07-23 03:22:14 +02:00
Justin M. Keyes
2000b6a64a Merge #8589 'VimL: Remove legacy v:xx aliases' 2018-07-23 03:18:10 +02:00
Nathan Long
cdbfdcfcc4 doc: README: "Transitioning from Vim" note (#8763) 2018-07-23 03:06:27 +02:00
Jan Edmund Lazo
765711e272 vim-patch:8.0.1765: CTRL-G j in Insert mode is incorrect when 'virtualedit' set (#8757)
Problem:    CTRL-G j in Insert mode is incorrect when 'virtualedit' is set.
Solution:   Take coladd into account. (Christian Brabandt, closes vim/vim#2743)
db0eedec16
2018-07-23 02:11:13 +02:00
Justin M. Keyes
48c0e916a1
Merge #8753 from janlazo/vim-8.0.0724 2018-07-23 02:10:06 +02:00
Jan Edmund Lazo
c9f2faf3bf vim-patch:8.0.1398: :packadd does not load packages from the "start" directory (#8762)
Problem:    :packadd does not load packages from the "start" directory.
            (Alejandro Hernandez)
Solution:   Make :packadd look in the "start" directory if those packages were
            not loaded on startup.
9e1d399e63
2018-07-23 02:04:49 +02:00
Shougo Matsushita
03bd5a4b91 Make "v:errmsg", "v:shell_error" and "v:this_session" distinct 2018-07-23 08:47:51 +09:00
Synray
13d29cb9ed man.vim: improve manSentence regex (#8764)
ref https://github.com/neovim/neovim/pull/8709#issuecomment-406319186
2018-07-22 18:30:38 +02:00
Björn Linse
94841e5eae
Merge pull request #8221 from bfredl/hlstate
UI grid protocol revision: line based updates and semantic highlights
2018-07-21 14:41:49 +02:00
Björn Linse
6b8cd827a9 ui: add tests for hlstate extension 2018-07-21 13:21:59 +02:00
Björn Linse
0bdf8979a2 ui: docs for ext_newgrid and ext_hlstate 2018-07-21 13:21:59 +02:00
Björn Linse
1adb01c120 ui: use line-based rather than char-based updates in screen.c
Add ext_newgrid and ext_hlstate extensions. These use predefined
highlights and line-segment based updates, for efficiency and
simplicity.. The ext_hlstate extension in addition allows semantic
identification of builtin and syntax highlights.

Reimplement the old char-based updates in the remote UI layer, for
compatibility. For the moment, this is still the default. The bulitin
TUI uses the new line-based protocol.

cmdline uses curwin cursor position when ext_cmdline is active.
2018-07-21 13:21:58 +02:00
Björn Linse
2134396074 ui: add TODO for non-working terminal linewrap
Note: this has not been working since the TUI reimplementation
2018-07-21 13:20:38 +02:00
Björn Linse
989b585e10 highlight: refactor to use stateful representation
This allows us to keep track of the source higlight groups,
and not only the final combined highlights.
2018-07-21 13:20:37 +02:00
Björn Linse
696e24f311 highlight: extract low-level highlight logic from syntax, ui 2018-07-21 10:37:44 +02:00
Justin M. Keyes
5ff90a100a
Merge #8761 from janlazo/vim-8.0.1503 2018-07-20 03:56:13 +02:00
Justin M. Keyes
f5d7123f6c version bump 2018-07-19 21:53:21 +02:00
Jan Edmund Lazo
588e86bda6 hardcopy: refactor mch_print_text_out()
Combine variable declaration and initialization to add const.
2018-07-19 12:33:05 -04:00
Jan Edmund Lazo
8441af37d8 vim-patch:8.1.0056: crash when using :hardcopy with illegal byte
Problem:    Crash when using :hardcopy with illegal byte.
Solution:   Check for string_convert() returning NULL. (Dominique Pelle)
43dee181f5
2018-07-19 12:21:14 -04:00
Jan Edmund Lazo
2ea619c10b vim-patch:8.0.1503: access memory beyond end of string
Problem:    Access memory beyond end of string. (Coverity)
Solution:   Keep allocated memory in separate pointer.  Avoid outputting the
            NUL character.
cdd09aa51a
2018-07-18 21:20:11 -04:00
Justin M. Keyes
489d32f2b8
startup: fix ":if 0|syntax on|endif" bug (#8731)
Problem: ":if 0|syntax {on,off}|endif" skips the default of "syntax on"
because the executor was setting the `did_syntax_onoff` flag even though
"syntax {on,off}" is not actually executed.

closes #8728
2018-07-18 14:30:11 +02:00
Justin M. Keyes
cd94dd6bb2 NVIM v0.3.1
FEATURES:
07499a842b #8709 man.vim: C highlighting for EXAMPLES section
07f82ad1be #8699 TUI: urxvt: also send xterm focus-reporting seqs
40911e435e #8616 API: emit nvim_buf_lines_event from :terminal
c46997aa87 #8546 fillchars: Add "eob" flag

FIXES:
74d19f685f #8576 startup: avoid blank stdin buffer if other files were opened
4874214139 #8737 Only waitpid() for processes that we care about
cd6e7e8cf3 #8743 Check all child processes for exit in SIGCHLD handler
c230ef24a2 #8746 channel.c: Prevent channel_destroy_early() from freeing uninitialized rpc stuff
0ed8b12a07 #8681 transstr_buf: fix length comparison
d241f278d3 #8708 TUI: Fix standout mode
9afed40ea6 #8698 man.vim: fix for mandoc
e889640048 #8682 provider/node: npm --loglevel silent
1cbc830189 #8613 API: nvim_win_set_cursor: set curswant
bf6048e81d #8628 checkhealth: Python: fix VIRTUAL_ENV check
3cc3506965 #8528 checkhealth: node.js: also search yarn

CHANGES:
b7514493a0 #8619 defaults: shortmess+=F
12481781a0 #8578 highlight: high-priority CursorLine if fg is set.
01570f1ff3 #8726 terminal: handle &confirm and :confirm on unloading
56065bbdc6 #8721 screen: truncate showmode messages
bf2460e2f9 #7551 buffer: fix copying :setlocal options
c1c14faad9 #8520 Ex mode: always "improved" (gQ)
050f3975f6 #7992 options: remove 'maxcombine` option (always 6)

INTERNAL:
463da84806 #7992 screen: use UTF-8 representation
2018-07-18 13:44:59 +02:00
Justin M. Keyes
44b4f8c6e9
Merge #8679 from justinmk/doc 2018-07-18 13:42:07 +02:00
Justin M. Keyes
0615450688 gen_api_vimdoc.py: add whitespace before "~" 2018-07-18 13:38:06 +02:00
Justin M. Keyes
1999919c31 doc 2018-07-18 13:38:06 +02:00
Jan Edmund Lazo
031d21221e vim-patch:8.0.1799: no test for :registers command
Problem:    No test for :registers command.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#2880)
7ce551f317
2018-07-17 09:49:39 -04:00
Jan Edmund Lazo
b99bbc680e vim-patch:8.0.0727: message about what register to yank into is not translated
Problem:    Message about what register to yank into is not translated.
            (LemonBoy)
Solution:   Add _().
60d0e97497
2018-07-17 09:02:37 -04:00
Jan Edmund Lazo
eab17e5093 vim-patch:8.0.0724: the message for yanking doesn't indicate the register
Problem:    The message for yanking doesn't indicate the register.
Solution:   Show the register name in the "N lines yanked" message. (Lemonboy,
            closes vim/vim#1803, closes vim/vim#1809)
e45deb7997
2018-07-17 09:01:18 -04:00
James McCoy
cd6e7e8cf3
Merge pull request #8743 from dimbleby/multiple-children
Check all child processes for exit in SIGCHLD handler
2018-07-16 10:26:24 -04:00
Björn Linse
dfe79b67a5
Merge pull request #8651 from MichaHoffmann/feature_refactor_channel
channel.c: refactor spaghetti code
2018-07-15 19:55:53 +02:00
Björn Linse
c230ef24a2
Merge pull request #8746 from oni-link/fix.rpcstart2
Fix crash in channel_job_start() in combination with rpc and unknown command
2018-07-15 19:48:40 +02:00
micha
099718ae6d dispatch.c: changed api_set_error_call 2018-07-15 12:12:03 +02:00
oni-link
c180741189 channel.c: Prevent channel_destroy_early() from freeing uninitialized rpc stuff
Without this patch the following commands would crash:
    :call rpcstart('unknown_command')

    :set sh=unknown_command
    :call jobstart('ls',{'rpc':1})
2018-07-15 09:30:47 +02:00
David Hotham
dee2bf7b52 Check all child processes for exit in SIGCHLD handler
If a second and third child exit while we are already in the handler, we
will only see a single additional SIGCHLD.  Therefore the handler must
not stop after processing a single child but should check all children.

Fixes #8740
2018-07-14 14:18:34 +01:00
micha
ed02278e42 channel.c: refactor spaghetti code
channel.c: WIP remove redundant method check and added FUNC_ATTR_NONNULL_ALL macro

channel.c channel_defs.h helpers.c: added Error field to RequestEvent, added no_op handler func

channel.c: use const char* instead of string and cleanup

channel.c; channel_defs.h; helpers.c: removed error from event again; send errors directly to the channel without using handlers and events

channel.c: fixed memory leak and lint errors

api/private/dispatch.c; api/vim.c; msgpack_rpc/channel.c msgpack_rpc/helpers.c added Error* field to msgpack_get_handler_for; further refactored channel.c

channel.c:323 changed order of evaluation in if statement

channel.c: removed superflous whitespace

dispatch.c: review comment
2018-07-14 11:47:18 +02:00
James McCoy
4874214139
Merge pull request #8737 from dimbleby/overly-general-waitpid
Only waitpid() for processes that we care about
2018-07-13 19:59:09 -04:00
David Hotham
fe913d7838 Only waitpid() for processes that we care about
It seems as though in an AppImage there's an extra child process that
dies at some early point, before we have set up a SIGCHLD handler.  So
when we later get a SIGCHLD from a child that we do care about,
waitpid(-1, ...) tells us about the extra child - and we don't notice
that the interesting child has exited.

Or something like that!

See also:

* https://patchwork.kernel.org/patch/9949491/ in which perf hit
something similar
* discussion at the AppImage repository:
https://github.com/AppImage/AppImageKit/issues/812#issuecomment-404662110.

Fix is to be explicit about which process we are waitpid()'ing for, so
we never need be distracted by children that we don't know about.

Fixes #8104
2018-07-13 20:56:04 +01:00
Jan Edmund Lazo
392817c2da vim-patch:8.0.0630: it is not easy to work on lines without a match (#8734)
Problem:    The :global command does not work recursively, which makes it
            difficult to execute a command on a line where one pattern matches
            and another does not match. (Miles Cranmer)
Solution:   Allow for recursion if it is for only one line. (closes vim/vim#1760)
f84b122a99
2018-07-13 21:14:46 +02:00
Justin M. Keyes
fc45c97829 Merge #8736 'vim-patch:8.0.0697: stable keymap.h' 2018-07-13 20:54:52 +02:00
Jan Edmund Lazo
eaf54132f9 keymap: add commented events to match 8.0.0697
KE_MOUSEMOVE, KE_CANCEL are added in later patches.
2018-07-13 11:43:05 -04:00