Skip to content

Conversation

bfredl
Copy link
Member

@bfredl bfredl commented Mar 2, 2018

Instead of scrolling the entire screen like a dumb terminal, only scroll the messages that has been shown so far. It looks best with laststatus=2, to give a visual marker of the scrolled region. (of course a new solid line could be added for this purpose). Pager is unaffected, and scrolls the entire screen as usual.

Not sure if/how we want to integrate this though:

  • Make it the default, and deal with the pitchforks.
  • Add an option. But options are evil, add complexity and all that.
  • Do nothing. The vintage full terminal scroll obviously adds to the experience of a real UNIX editor.

@bfredl bfredl changed the title [WIP] msg: do not scroll more than neccessary when showing multiline messages [WIP] msg: do not scroll entire screen when showing multiline messages Mar 2, 2018
@justinmk
Copy link
Member

justinmk commented Mar 2, 2018

It looks best with laststatus=2, to give a visual marker of the scrolled region. (of course a new solid line could be added for this purpose)

I would suggest always showing some sort of line (the statusline isn't really relevant in this state), one of these (or just a solid color):

─       hh      2500    9472    BOX DRAWINGS LIGHT HORIZONTAL
━       HH      2501    9473    BOX DRAWINGS HEAVY HORIZONTAL

Not sure if/how we want to integrate this though:

Definitely it should be the default.

Probably it should be an option, if only to avoid churn in tests. Could be a new flag in 'display'.

@marvim marvim added the WIP label Mar 2, 2018
@bfredl
Copy link
Member Author

bfredl commented Mar 2, 2018

I thought of shortmess but display is probably better, as we can make keyword and not single char (which has higher risk of vim-dev conflict)

I will add a dedicated line. If we use unicode char it needs to be overridable, what if the users favorite font looks ugly with this char. Probably should use fillchars for this.

@bfredl
Copy link
Member Author

bfredl commented Mar 4, 2018

Added display=msgsep flag, fillchars=msgsep: (blank) default, and hi link MsgSeparator StatusLine highlight.

@bfredl
Copy link
Member Author

bfredl commented Mar 4, 2018

Interesting ASAN failure. We probably need to add some check to not enter the debugger after start of teardown.

[ RUN      ] Ex commands coloring support does not prevent mapping error from cancelling prompt: ERR
==================== File /home/travis/build/neovim/neovim/build/log/ubsan.21230 ====================
= =================================================================
= ==21230==ERROR: AddressSanitizer: heap-use-after-free on address 0x604000000398 at pc 0x000000a24723 bp 0x7fff7c971fc0 sp 0x7fff7c971fb8
= READ of size 8 at 0x604000000398 thread T0
=     #0 0xa24722 in QUEUE_EMPTY /home/travis/build/neovim/neovim/src/nvim/lib/queue.h:46:18
=     #1 0xa24c9d in multiqueue_empty /home/travis/build/neovim/neovim/src/nvim/event/multiqueue.c:167:10
=     #2 0xa26b30 in multiqueue_process_events /home/travis/build/neovim/neovim/src/nvim/event/multiqueue.c:147:11
=     #3 0xa2079f in loop_poll_events /home/travis/build/neovim/neovim/src/nvim/event/loop.c:66:3
=     #4 0x123bff0 in os_breakcheck /home/travis/build/neovim/neovim/src/nvim/os/input.c:157:5
=     #5 0xd4b9bb in vgetorpeek /home/travis/build/neovim/neovim/src/nvim/getchar.c:1687:11
=     #6 0xd4857b in vpeekc /home/travis/build/neovim/neovim/src/nvim/getchar.c:1537:10
=     #7 0xd5acec in char_avail /home/travis/build/neovim/neovim/src/nvim/getchar.c:1564:12
=     #8 0x1714a22 in state_enter /home/travis/build/neovim/neovim/src/nvim/state.c:40:9
=     #9 0xbdbf01 in command_line_enter /home/travis/build/neovim/neovim/src/nvim/ex_getln.c:385:3
=     #10 0xbd5520 in getcmdline /home/travis/build/neovim/neovim/src/nvim/ex_getln.c:1980:10
=     #11 0xbdf581 in getcmdline_prompt /home/travis/build/neovim/neovim/src/nvim/ex_getln.c:2018:29
=     #12 0xabb88d in do_debug /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:192:25
=     #13 0xabeb27 in dbg_check_breakpoint /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:475:7
=     #14 0xb1304c in do_one_cmd /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:1498:3
=     #15 0xb05da3 in do_cmdline /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:609:20
=     #16 0xb0c0b5 in do_cmdline_cmd /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:280:10
=     #17 0xf58eda in free_all_mem /home/travis/build/neovim/neovim/src/nvim/memory.c:599:3
=     #18 0x125288c in mch_exit /home/travis/build/neovim/neovim/src/nvim/os_unix.c:153:3
=     #19 0x1029093 in exit_event /home/travis/build/neovim/neovim/src/nvim/msgpack_rpc/channel.c:539:5
=     #20 0xa26bba in multiqueue_process_events /home/travis/build/neovim/neovim/src/nvim/event/multiqueue.c:150:7
=     #21 0xa2079f in loop_poll_events /home/travis/build/neovim/neovim/src/nvim/event/loop.c:66:3
=     #22 0x123fd56 in input_poll /home/travis/build/neovim/neovim/src/nvim/os/input.c:349:3
=     #23 0x123b4cf in inbuf_poll /home/travis/build/neovim/neovim/src/nvim/os/input.c:372:24
=     #24 0x123b335 in os_inchar /home/travis/build/neovim/neovim/src/nvim/os/input.c:115:18
=     #25 0x1714b5e in state_enter /home/travis/build/neovim/neovim/src/nvim/state.c:55:13
=     #26 0xbdbf01 in command_line_enter /home/travis/build/neovim/neovim/src/nvim/ex_getln.c:385:3
=     #27 0xbd5520 in getcmdline /home/travis/build/neovim/neovim/src/nvim/ex_getln.c:1980:10
=     #28 0xbdf581 in getcmdline_prompt /home/travis/build/neovim/neovim/src/nvim/ex_getln.c:2018:29
=     #29 0xabb88d in do_debug /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:192:25
=     #30 0xabeb27 in dbg_check_breakpoint /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:475:7
=     #31 0xb1304c in do_one_cmd /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:1498:3
=     #32 0xb05da3 in do_cmdline /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:609:20
=     #33 0xb0c0b5 in do_cmdline_cmd /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:280:10
=     #34 0xabe1f6 in ex_debug /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:427:3
=     #35 0xb23b3c in do_one_cmd /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:2242:5
=     #36 0xb05da3 in do_cmdline /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:609:20
=     #37 0x10afa37 in nv_colon /home/travis/build/neovim/neovim/src/nvim/normal.c:4558:18
=     #38 0x109a01a in normal_execute /home/travis/build/neovim/neovim/src/nvim/normal.c:1136:3
=     #39 0x1714d89 in state_enter /home/travis/build/neovim/neovim/src/nvim/state.c:67:26
=     #40 0x1056f64 in normal_enter /home/travis/build/neovim/neovim/src/nvim/normal.c:466:3
=     #41 0xe4983c in main /home/travis/build/neovim/neovim/src/nvim/main.c:572:3
=     #42 0x2b54ce7aaf44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287
=     #43 0x44d39b in _start (/home/travis/build/neovim/neovim/build/bin/nvim+0x44d39b)
= 
= 0x604000000398 is located 8 bytes inside of 48-byte region [0x604000000390,0x6040000003c0)
= freed by thread T0 here:
=     #0 0x4ee232 in __interceptor_free /local/mnt/workspace/tmp/ubuntu_rel/llvm/utils/release/final/llvm.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:47:3
=     #1 0xf56654 in xfree /home/travis/build/neovim/neovim/src/nvim/memory.c:133:3
=     #2 0xa24645 in multiqueue_free /home/travis/build/neovim/neovim/src/nvim/event/multiqueue.c:126:3
=     #3 0xa21eae in loop_close /home/travis/build/neovim/neovim/src/nvim/event/loop.c:138:3
=     #4 0xe46714 in event_teardown /home/travis/build/neovim/neovim/src/nvim/main.c:178:10
=     #5 0x125284c in mch_exit /home/travis/build/neovim/neovim/src/nvim/os_unix.c:145:8
=     #6 0x1029093 in exit_event /home/travis/build/neovim/neovim/src/nvim/msgpack_rpc/channel.c:539:5
=     #7 0xa26bba in multiqueue_process_events /home/travis/build/neovim/neovim/src/nvim/event/multiqueue.c:150:7
=     #8 0xa2079f in loop_poll_events /home/travis/build/neovim/neovim/src/nvim/event/loop.c:66:3
=     #9 0x123fd56 in input_poll /home/travis/build/neovim/neovim/src/nvim/os/input.c:349:3
=     #10 0x123b4cf in inbuf_poll /home/travis/build/neovim/neovim/src/nvim/os/input.c:372:24
=     #11 0x123b335 in os_inchar /home/travis/build/neovim/neovim/src/nvim/os/input.c:115:18
=     #12 0x1714b5e in state_enter /home/travis/build/neovim/neovim/src/nvim/state.c:55:13
=     #13 0xbdbf01 in command_line_enter /home/travis/build/neovim/neovim/src/nvim/ex_getln.c:385:3
=     #14 0xbd5520 in getcmdline /home/travis/build/neovim/neovim/src/nvim/ex_getln.c:1980:10
=     #15 0xbdf581 in getcmdline_prompt /home/travis/build/neovim/neovim/src/nvim/ex_getln.c:2018:29
=     #16 0xabb88d in do_debug /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:192:25
=     #17 0xabeb27 in dbg_check_breakpoint /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:475:7
=     #18 0xb1304c in do_one_cmd /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:1498:3
=     #19 0xb05da3 in do_cmdline /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:609:20
=     #20 0xb0c0b5 in do_cmdline_cmd /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:280:10
=     #21 0xabe1f6 in ex_debug /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:427:3
=     #22 0xb23b3c in do_one_cmd /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:2242:5
=     #23 0xb05da3 in do_cmdline /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:609:20
=     #24 0x10afa37 in nv_colon /home/travis/build/neovim/neovim/src/nvim/normal.c:4558:18
=     #25 0x109a01a in normal_execute /home/travis/build/neovim/neovim/src/nvim/normal.c:1136:3
=     #26 0x1714d89 in state_enter /home/travis/build/neovim/neovim/src/nvim/state.c:67:26
=     #27 0x1056f64 in normal_enter /home/travis/build/neovim/neovim/src/nvim/normal.c:466:3
=     #28 0xe4983c in main /home/travis/build/neovim/neovim/src/nvim/main.c:572:3
=     #29 0x2b54ce7aaf44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287
= 
= previously allocated by thread T0 here:
=     #0 0x4ee573 in malloc /local/mnt/workspace/tmp/ubuntu_rel/llvm/utils/release/final/llvm.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:67:3
=     #1 0xf562e1 in try_malloc /home/travis/build/neovim/neovim/src/nvim/memory.c:87:15
=     #2 0xf56509 in xmalloc /home/travis/build/neovim/neovim/src/nvim/memory.c:121:15
=     #3 0xa23bf2 in multiqueue_new /home/travis/build/neovim/neovim/src/nvim/event/multiqueue.c:103:20
=     #4 0xa240e6 in multiqueue_new_child /home/travis/build/neovim/neovim/src/nvim/event/multiqueue.c:97:10
=     #5 0xa1edc8 in loop_init /home/travis/build/neovim/neovim/src/nvim/event/loop.c:26:23
=     #6 0xe4655a in event_init /home/travis/build/neovim/neovim/src/nvim/main.c:146:3
=     #7 0xe46ede in main /home/travis/build/neovim/neovim/src/nvim/main.c:261:3
=     #8 0x2b54ce7aaf44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287
= 
= SUMMARY: AddressSanitizer: heap-use-after-free /home/travis/build/neovim/neovim/src/nvim/lib/queue.h:46:18 in QUEUE_EMPTY
= Shadow bytes around the buggy address:
=   0x0c087fff8020: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 07 fa
=   0x0c087fff8030: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd
=   0x0c087fff8040: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd
=   0x0c087fff8050: fa fa 00 00 00 00 00 04 fa fa 00 00 00 00 00 04
=   0x0c087fff8060: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd
= =>0x0c087fff8070: fa fa fd[fd]fd fd fd fd fa fa fd fd fd fd fd fd
=   0x0c087fff8080: fa fa 00 00 00 00 00 fa fa fa 00 00 00 00 00 fa
=   0x0c087fff8090: fa fa fd fd fd fd fd fd fa fa 00 00 00 00 00 00
=   0x0c087fff80a0: fa fa 00 00 00 00 00 fa fa fa 00 00 00 00 00 fa
=   0x0c087fff80b0: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fa
=   0x0c087fff80c0: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fa
= Shadow byte legend (one shadow byte represents 8 application bytes):
=   Addressable:           00
=   Partially addressable: 01 02 03 04 05 06 07 
=   Heap left redzone:       fa
=   Freed heap region:       fd
=   Stack left redzone:      f1
=   Stack mid redzone:       f2
=   Stack right redzone:     f3
=   Stack after return:      f5
=   Stack use after scope:   f8
=   Global redzone:          f9
=   Global init order:       f6
=   Poisoned by user:        f7
=   Container overflow:      fc
=   Array cookie:            ac
=   Intra object redzone:    bb
=   ASan internal:           fe
=   Left alloca redzone:     ca
=   Right alloca redzone:    cb
= ==21230==ABORTING
=====================================================================================================
test/helpers.lua:95: assertion failed!

@bfredl
Copy link
Member Author

bfredl commented Mar 4, 2018

It should be visible in some form by default (either color or fillchars).

It is, hi link MsgSeparator StatusLine, gives a nice solid line in same color as status line.

@justinmk justinmk added the ux user experience label Mar 4, 2018
@@ -642,7 +642,7 @@ return {
vim=true,
redraw={'all_windows'},
varname='p_dy',
defaults={if_true={vi="", vim="lastline"}}
defaults={if_true={vi="", vim="lastline,msgsep"}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also mention in vim_diff.txt

@bfredl
Copy link
Member Author

bfredl commented Mar 4, 2018

also mention in vim_diff.txt

Yes, I haven't started with docs yet :) Is the name msgsep OK?

@bfredl bfredl force-pushed the msgscroll branch 6 times, most recently from 406a4ff to abe4443 Compare March 26, 2018 17:36
@bfredl
Copy link
Member Author

bfredl commented Mar 26, 2018

Added tests and docs, marking RFC.

@bfredl bfredl changed the title [WIP] msg: do not scroll entire screen when showing multiline messages [RFC] add display=msgsep flag to separate messages and avoid full-screen scrolling Mar 26, 2018
@marvim marvim added RFC and removed WIP labels Mar 26, 2018
@justinmk
Copy link
Member

justinmk commented Mar 26, 2018

https://api.travis-ci.org/v3/job/358522097/log.txt

�[32m�[2m[ RUN      ]�[0m�[0m :Man man.lua: highlight_line() clears backspaces from text and adds highlights: �[2m5.59 ms�[0m �[1m�[32mOK�[0m�[0m
==================== File /home/travis/build/neovim/neovim/build/log/ubsan.1567 ====================
= =================================================================
= ==1567==ERROR: AddressSanitizer: SEGV on unknown address 0x000001b458f0 (pc 0x00000044e641 bp 0x000000000001 sp 0x7ffcd7c90880 T0)
= ==1567==The signal is caused by a WRITE memory access.
=     #0 0x44e640 in atomic_compare_exchange_strong<__sanitizer::atomic_uint8_t> /local/mnt/workspace/tmp/ubuntu_rel/llvm/utils/release/final/llvm.src/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_atomic_clang.h:90:10
=     #1 0x44e640 in AtomicallySetQuarantineFlagIfAllocated /local/mnt/workspace/tmp/ubuntu_rel/llvm/utils/release/final/llvm.src/projects/compiler-rt/lib/asan/asan_allocator.cc:520
=     #2 0x44e640 in __asan::Allocator::Deallocate(void*, unsigned long, __sanitizer::BufferedStackTrace*, __asan::AllocType) /local/mnt/workspace/tmp/ubuntu_rel/llvm/utils/release/final/llvm.src/projects/compiler-rt/lib/asan/asan_allocator.cc:597
=     #3 0x4ee5b6 in __interceptor_free /local/mnt/workspace/tmp/ubuntu_rel/llvm/utils/release/final/llvm.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:50:3
=     #4 0xf5abf4 in xfree /home/travis/build/neovim/neovim/build/../src/nvim/memory.c:133:3
=     #5 0x11a94a8 in free_string_option /home/travis/build/neovim/neovim/build/../src/nvim/option.c:2233:5
=     #6 0x11a8992 in free_all_options /home/travis/build/neovim/neovim/build/../src/nvim/option.c:947:9
=     #7 0xf5d551 in free_all_mem /home/travis/build/neovim/neovim/build/../src/nvim/memory.c:617:3
=     #8 0x1257ecc in mch_exit /home/travis/build/neovim/neovim/build/../src/nvim/os_unix.c:153:3
...

Edit: Not related to this PR, it happened on #8184 also. https://api.travis-ci.org/v3/job/358244576/log.txt

@justinmk justinmk added this to the 0.2.3 milestone Mar 27, 2018
@bfredl
Copy link
Member Author

bfredl commented Mar 29, 2018

Seems at any point os_breakcheck is called, nvim could decide to exit (in the clean fashion, which IIRC will include arbitrary event processing), do we really want that?

As the ASAN failures look unrelated, should we merge this? If this causes trouble/backlash for master-followers, there is ample time to change the default back before the release.

@@ -5999,6 +5999,7 @@ static const char *highlight_init_both[] = {
"default link QuickFixLine Search",
"default link Substitute Search",
"default link Whitespace NonText",
"default link MsgSeparator StatusLine",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the others are in alphabetical order

Copy link
Member

@justinmk justinmk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to merge

@justinmk justinmk merged commit 98e7112 into neovim:master Mar 31, 2018
@justinmk justinmk removed the RFC label Mar 31, 2018
@blueyed
Copy link
Contributor

blueyed commented Apr 1, 2018

@bfredl
Thanks for this very nice feature!

bfredl added a commit to bfredl/neovim that referenced this pull request May 3, 2018
fixes neovim#8354

Regression from neovim#8088, where we try to avoid clearing the screen
if not absolutely necessary
bfredl added a commit to bfredl/neovim that referenced this pull request May 4, 2018
fixes neovim#8354

Regression from neovim#8088, where we try to avoid clearing the screen
if not absolutely necessary
justinmk added a commit that referenced this pull request Jun 11, 2018
FEATURES:
3cc7ebf #7234 built-in VimL expression parser
6a7c904 #4419 implement <Cmd> key to invoke command in any mode
b836328 #7679 'startup: treat stdin as text instead of commands'
58b210e :digraphs : highlight with hl-SpecialKey #2690
7a13611 #8276 'startup: Let `-s -` read from stdin'
1e71978 events: VimSuspend, VimResume #8280
1e7d5e8 #6272 'stdpath()'
f96d99a #8247 server: introduce --listen
e8c39f7 #8226 insert-mode: interpret unmapped META as ESC
98e7112 msg: do not scroll entire screen (#8088)
f72630b #8055 let negative 'writedelay' show all redraws
5d2dd2e win: has("wsl") on Windows Subsystem for Linux #7330
a4f6cec cmdline: CmdlineEnter and CmdlineLeave autocommands (#7422)
207b7ca #6844 channels: support buffered output and bytes sockets/stdio

API:
f85cbea #7917 API: buffer updates
418abfc #6743 API: list information about all channels/jobs.
36b2e3f #8375 API: nvim_get_commands
273d2cd #8329 API: Make nvim_set_option() update `:verbose set …`
8d40b36 #8371 API: more reliable/descriptive VimL errors
ebb1acb #8353 API: nvim_call_dict_function
9f994bb #8004 API: nvim_list_uis
3405704 #7520 API/UI: forward option updates to UIs
911b1e4 #7821 API: improve nvim_command_output

WINDOWS OS:
9cefd83 #8084, #8516 build/win: support MSVC
ee4e1fd win: Fix reading content from stdin (#8267)

TUI:
ffb8904 #8309 TUI: add support for mouse release events in urxvt
8d5a46e #8081 TUI: implement "standout" attribute
6071637 TUI: support TERM=konsole-256color
67848c0 #7653 TUI: report TUI info with -V3 ('verbose' >= 3)
3d0ee17 TUI/rxvt: enable focus-reporting
d109f56 #7640 TUI: 'term' option: reflect effective terminal behavior

FIXES:
ed6a113 #8273 'job-control: avoid kill-timer race'
4e02f1a #8107 'jobs: separate process-group'
451c48a terminal: flush vterm output buffer on pty output #8486
5d6732f :checkhealth fixes #8335
53f11dc #8218 'Fix errors reported by PVS'
d05712f inccommand: pause :terminal redraws (#8307)
51af911 inccommand: do not execute trailing commands #8256
84359a4 terminal: resize to the max dimensions (#8249)
d49c1dd #8228 Make vim_fgets() return the same values as in Vim
60e96a4 screen: winhl=Normal:Background should not override syntax (#8093)
0c59ac1 #5908 'shada: Also save numbered marks'
ba87a2c cscope: ignore EINTR while reading the prompt (#8079)
b1412dc #7971 ':terminal Enter/Leave should not increment jumplist'
3a5721e TUI: libtermkey: force CSI driver for mouse input #7948
6ff13d7 #7720 TUI: faster startup
1c6e956 #7862 TUI: fix resize-related segfaults
a58c909 #7676 TUI: always hide cursor when flushing, never flush buffers during unibilium output
303e1df #7624 TUI: disable BCE almost always
249bdb0 #7761 mark: Make sure that jumplist item will not have zero lnum
6f41ce0 #7704 macOS: Set $LANG based on the system locale
a043899 #7633 'Retry fgets on EINTR'

CHANGES:
ad60927 #8304 default to 'nofsync'
f3f1970 #8035 defaults: 'fillchars'
a6052c7 #7984 defaults: sidescroll=1
b69fa86 #7888 defaults: enable cscopeverbose
7c4bb23 defaults: do :filetype stuff unless explicitly "off"
2aa308c #5658 'Apply :lmap in macros'
8ce6393 terminal: Leave 'relativenumber' alone (#8360)
e46534b #4486 refactor: Remove maxmem, maxmemtot options
131aad9 win: defaults: 'shellcmdflag', 'shellxquote' #7343
c57d315 #8031 jobwait(): return -2 on interrupt also with timeout
6452831 clipboard: macOS: fallback to tmux if pbcopy is broken #7940
300d365 #7919 Make 'langnoremap' apply directly after a map
ada1956 #7880 'lua/executor: Remove lightuserdata'

INTERNAL:
de0a954 #7806 internal statistics for list impl
dee78a4 #7708 rewrite internal list impl
justinmk added a commit to justinmk/neovim that referenced this pull request Aug 5, 2018
closes neovim#8813
ref neovim#7813 (comment)
ref neovim#8088 (comment)

Sometimes ASan fails like this:

    = ==16820==ERROR: AddressSanitizer: SEGV on unknown address 0x000001baab50 (pc 0x00000044f3a1 bp 0x000000000001 sp 0x7fff7ddb6a60 T0)
    ...
    =     4 0xfbfae4 in xfree /home/travis/build/neovim/neovim/build/../src/nvim/memory.c:134:3
    =     5 0x120e948 in free_string_option /home/travis/build/neovim/neovim/build/../src/nvim/option.c:2207:5
    =     6 0x120de3d in free_all_options /home/travis/build/neovim/neovim/build/../src/nvim/option.c:923:9
    =     7 0xfc2441 in free_all_mem /home/travis/build/neovim/neovim/build/../src/nvim/memory.c:622:3
    =     8 0x12bbe6c in mch_exit /home/travis/build/neovim/neovim/build/../src/nvim/os_unix.c:153:3
    =     9 0x1092cc3 in exit_event /home/travis/build/neovim/neovim/build/../src/nvim/msgpack_rpc/channel.c:542:5
    =     10 0xa6b2d3 in multiqueue_process_events /home/travis/build/neovim/neovim/build/../src/nvim/event/multiqueue.c:150:7
    =     11 0xa64e2f in loop_poll_events /home/travis/build/neovim/neovim/build/../src/nvim/event/loop.c:65:3
    =     12 0x12a4ec0 in os_breakcheck /home/travis/build/neovim/neovim/build/../src/nvim/os/input.c:162:5
    =     13 0x1035f07 in line_breakcheck /home/travis/build/neovim/neovim/build/../src/nvim/misc1.c:2692:5
    ...
    =     19 0x137ac07 in vim_regexec_nl /home/travis/build/neovim/neovim/build/../src/nvim/regexp.c:7302:10
    =     20 0x910f2b in f_split /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:15673:17
    ...
    =     43 0x11667d5 in normal_check /home/travis/build/neovim/neovim/build/../src/nvim/normal.c:1325:5
    =     44 0x17774c1 in state_enter /home/travis/build/neovim/neovim/build/../src/nvim/state.c:28:35
    =     45 0x10c0bf4 in normal_enter /home/travis/build/neovim/neovim/build/../src/nvim/normal.c:467:3
    =     46 0xea98a2 in main /home/travis/build/neovim/neovim/build/../src/nvim/main.c:566:3
    =     47 0x7fbb0a667f44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287
    =     48 0x44e39b in _start (/home/travis/build/neovim/neovim/build/bin/nvim+0x44e39b)
    =====================================================================================================
    test/helpers.lua:149: assertion failed!

Discussion:
- `free_all_options` is free'ing something before it was alloc'd.
    - ~~Options init isn't complete?~~ (No: init completed, `main.c`
    reached `normal_enter()`)
- stdio RPC channel was closed (so `rpc_close` schedules `exit_event`)
    - was this because the client died from a invalid message?
-  `exit_event` is scheduled on `main_loop.fast_events`.
    - would `main_loop.events` defer it? Or do we need something like
    `stuffReadbuff(":qall!\n")`?
justinmk added a commit to justinmk/neovim that referenced this pull request Aug 5, 2018
closes neovim#8813
ref neovim#7813 (comment)
ref neovim#8088 (comment)

Sometimes ASan fails like this:

    = ==16820==ERROR: AddressSanitizer: SEGV on unknown address 0x000001baab50 (pc 0x00000044f3a1 bp 0x000000000001 sp 0x7fff7ddb6a60 T0)
    ...
    4 0xfbfae4 in xfree /home/travis/build/neovim/neovim/build/../src/nvim/memory.c:134:3
    5 0x120e948 in free_string_option /home/travis/build/neovim/neovim/build/../src/nvim/option.c:2207:5
    6 0x120de3d in free_all_options /home/travis/build/neovim/neovim/build/../src/nvim/option.c:923:9
    7 0xfc2441 in free_all_mem /home/travis/build/neovim/neovim/build/../src/nvim/memory.c:622:3
    8 0x12bbe6c in mch_exit /home/travis/build/neovim/neovim/build/../src/nvim/os_unix.c:153:3
    9 0x1092cc3 in exit_event /home/travis/build/neovim/neovim/build/../src/nvim/msgpack_rpc/channel.c:542:5
    10 0xa6b2d3 in multiqueue_process_events /home/travis/build/neovim/neovim/build/../src/nvim/event/multiqueue.c:150:7
    11 0xa64e2f in loop_poll_events /home/travis/build/neovim/neovim/build/../src/nvim/event/loop.c:65:3
    12 0x12a4ec0 in os_breakcheck /home/travis/build/neovim/neovim/build/../src/nvim/os/input.c:162:5
    13 0x1035f07 in line_breakcheck /home/travis/build/neovim/neovim/build/../src/nvim/misc1.c:2692:5
    ...
    19 0x137ac07 in vim_regexec_nl /home/travis/build/neovim/neovim/build/../src/nvim/regexp.c:7302:10
    20 0x910f2b in f_split /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:15673:17
    ...
    43 0x11667d5 in normal_check /home/travis/build/neovim/neovim/build/../src/nvim/normal.c:1325:5
    44 0x17774c1 in state_enter /home/travis/build/neovim/neovim/build/../src/nvim/state.c:28:35
    45 0x10c0bf4 in normal_enter /home/travis/build/neovim/neovim/build/../src/nvim/normal.c:467:3
    46 0xea98a2 in main /home/travis/build/neovim/neovim/build/../src/nvim/main.c:566:3
    47 0x7fbb0a667f44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287
    48 0x44e39b in _start (/home/travis/build/neovim/neovim/build/bin/nvim+0x44e39b)

Discussion:
- `free_all_options` is free'ing something before it was alloc'd.
    - ~~Options init isn't complete?~~ (No: init completed, `main.c`
    reached `normal_enter()`)
- stdio RPC channel was closed (so `rpc_close` schedules `exit_event`)
    - was this because the client died from a invalid message?
-  `exit_event` is scheduled on `main_loop.fast_events`.
    - would `main_loop.events` defer it? Or do we need something like
    `stuffReadbuff(":qall!\n")`?

Deferring the event:

    diff --git a/src/nvim/msgpack_rpc/channel.c b/src/nvim/msgpack_rpc/channel.c
    index 3244d83..62c7717 100644
    --- a/src/nvim/msgpack_rpc/channel.c
    +++ b/src/nvim/msgpack_rpc/channel.c
    @@ -532,7 +532,7 @@ void rpc_close(Channel *channel)
       channel_decref(channel);

       if (channel->streamtype == kChannelStreamStdio) {
    -    multiqueue_put(main_loop.fast_events, exit_event, 0);
    +    multiqueue_put(main_loop.events, exit_event, 0);
       }
     }

...leads to hangs (waiting for input):

    [5/7] Building C object test/functiona...s/CMakeFiles/tty-test.dir/tty-test.c.o�[K
    [6/7] Linking C executable bin/tty-test�[K
    [6/7] Linking C executable bin/tty-test�[K
    [7/7] cd /home/travis/build/neovim/neo...ild/neovim/neovim/cmake/RunTests.cmake�[K

    No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
    Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received

    The build has been terminated
justinmk added a commit to justinmk/neovim that referenced this pull request Aug 26, 2018
closes neovim#8813
ref neovim#7813 (comment)
ref neovim#8088 (comment)

Sometimes ASan fails like this:

    = ==16820==ERROR: AddressSanitizer: SEGV on unknown address 0x000001baab50 (pc 0x00000044f3a1 bp 0x000000000001 sp 0x7fff7ddb6a60 T0)
    ...
    4 0xfbfae4 in xfree /home/travis/build/neovim/neovim/build/../src/nvim/memory.c:134:3
    5 0x120e948 in free_string_option /home/travis/build/neovim/neovim/build/../src/nvim/option.c:2207:5
    6 0x120de3d in free_all_options /home/travis/build/neovim/neovim/build/../src/nvim/option.c:923:9
    7 0xfc2441 in free_all_mem /home/travis/build/neovim/neovim/build/../src/nvim/memory.c:622:3
    8 0x12bbe6c in mch_exit /home/travis/build/neovim/neovim/build/../src/nvim/os_unix.c:153:3
    9 0x1092cc3 in exit_event /home/travis/build/neovim/neovim/build/../src/nvim/msgpack_rpc/channel.c:542:5
    10 0xa6b2d3 in multiqueue_process_events /home/travis/build/neovim/neovim/build/../src/nvim/event/multiqueue.c:150:7
    11 0xa64e2f in loop_poll_events /home/travis/build/neovim/neovim/build/../src/nvim/event/loop.c:65:3
    12 0x12a4ec0 in os_breakcheck /home/travis/build/neovim/neovim/build/../src/nvim/os/input.c:162:5
    13 0x1035f07 in line_breakcheck /home/travis/build/neovim/neovim/build/../src/nvim/misc1.c:2692:5
    ...
    19 0x137ac07 in vim_regexec_nl /home/travis/build/neovim/neovim/build/../src/nvim/regexp.c:7302:10
    20 0x910f2b in f_split /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:15673:17
    ...
    43 0x11667d5 in normal_check /home/travis/build/neovim/neovim/build/../src/nvim/normal.c:1325:5
    44 0x17774c1 in state_enter /home/travis/build/neovim/neovim/build/../src/nvim/state.c:28:35
    45 0x10c0bf4 in normal_enter /home/travis/build/neovim/neovim/build/../src/nvim/normal.c:467:3
    46 0xea98a2 in main /home/travis/build/neovim/neovim/build/../src/nvim/main.c:566:3
    47 0x7fbb0a667f44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287
    48 0x44e39b in _start (/home/travis/build/neovim/neovim/build/bin/nvim+0x44e39b)

Discussion:
- `free_all_options` is free'ing something before it was alloc'd.
    - ~~Options init isn't complete?~~ (No: init completed, `main.c`
    reached `normal_enter()`)
- stdio RPC channel was closed (so `rpc_close` schedules `exit_event`)
    - was this because the client died from a invalid message?
-  `exit_event` is scheduled on `main_loop.fast_events`.
    - would `main_loop.events` defer it? Or do we need something like
    `stuffReadbuff(":qall!\n")`?

Deferring the event:

    diff --git a/src/nvim/msgpack_rpc/channel.c b/src/nvim/msgpack_rpc/channel.c
    index 3244d83..62c7717 100644
    --- a/src/nvim/msgpack_rpc/channel.c
    +++ b/src/nvim/msgpack_rpc/channel.c
    @@ -532,7 +532,7 @@ void rpc_close(Channel *channel)
       channel_decref(channel);

       if (channel->streamtype == kChannelStreamStdio) {
    -    multiqueue_put(main_loop.fast_events, exit_event, 0);
    +    multiqueue_put(main_loop.events, exit_event, 0);
       }
     }

...leads to hangs (waiting for input):

    [5/7] Building C object test/functiona...s/CMakeFiles/tty-test.dir/tty-test.c.o�[K
    [6/7] Linking C executable bin/tty-test�[K
    [6/7] Linking C executable bin/tty-test�[K
    [7/7] cd /home/travis/build/neovim/neo...ild/neovim/neovim/cmake/RunTests.cmake�[K

    No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
    Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received

    The build has been terminated
justinmk added a commit to justinmk/neovim that referenced this pull request Sep 19, 2018
closes neovim#8813
ref neovim#7813 (comment)
ref neovim#8088 (comment)

Sometimes ASan fails like this:

    = ==16820==ERROR: AddressSanitizer: SEGV on unknown address 0x000001baab50 (pc 0x00000044f3a1 bp 0x000000000001 sp 0x7fff7ddb6a60 T0)
    ...
    4 0xfbfae4 in xfree /home/travis/build/neovim/neovim/build/../src/nvim/memory.c:134:3
    5 0x120e948 in free_string_option /home/travis/build/neovim/neovim/build/../src/nvim/option.c:2207:5
    6 0x120de3d in free_all_options /home/travis/build/neovim/neovim/build/../src/nvim/option.c:923:9
    7 0xfc2441 in free_all_mem /home/travis/build/neovim/neovim/build/../src/nvim/memory.c:622:3
    8 0x12bbe6c in mch_exit /home/travis/build/neovim/neovim/build/../src/nvim/os_unix.c:153:3
    9 0x1092cc3 in exit_event /home/travis/build/neovim/neovim/build/../src/nvim/msgpack_rpc/channel.c:542:5
    10 0xa6b2d3 in multiqueue_process_events /home/travis/build/neovim/neovim/build/../src/nvim/event/multiqueue.c:150:7
    11 0xa64e2f in loop_poll_events /home/travis/build/neovim/neovim/build/../src/nvim/event/loop.c:65:3
    12 0x12a4ec0 in os_breakcheck /home/travis/build/neovim/neovim/build/../src/nvim/os/input.c:162:5
    13 0x1035f07 in line_breakcheck /home/travis/build/neovim/neovim/build/../src/nvim/misc1.c:2692:5
    ...
    19 0x137ac07 in vim_regexec_nl /home/travis/build/neovim/neovim/build/../src/nvim/regexp.c:7302:10
    20 0x910f2b in f_split /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:15673:17
    ...
    43 0x11667d5 in normal_check /home/travis/build/neovim/neovim/build/../src/nvim/normal.c:1325:5
    44 0x17774c1 in state_enter /home/travis/build/neovim/neovim/build/../src/nvim/state.c:28:35
    45 0x10c0bf4 in normal_enter /home/travis/build/neovim/neovim/build/../src/nvim/normal.c:467:3
    46 0xea98a2 in main /home/travis/build/neovim/neovim/build/../src/nvim/main.c:566:3
    47 0x7fbb0a667f44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287
    48 0x44e39b in _start (/home/travis/build/neovim/neovim/build/bin/nvim+0x44e39b)

Discussion:
- `free_all_options` is free'ing something before it was alloc'd.
    - ~~Options init isn't complete?~~ (No: init completed, `main.c`
    reached `normal_enter()`)
- stdio RPC channel was closed (so `rpc_close` schedules `exit_event`)
    - was this because the client died from a invalid message?
-  `exit_event` is scheduled on `main_loop.fast_events`.
    - would `main_loop.events` defer it? Or do we need something like
    `stuffReadbuff(":qall!\n")`?

Deferring the event:

    diff --git a/src/nvim/msgpack_rpc/channel.c b/src/nvim/msgpack_rpc/channel.c
    index 3244d83..62c7717 100644
    --- a/src/nvim/msgpack_rpc/channel.c
    +++ b/src/nvim/msgpack_rpc/channel.c
    @@ -532,7 +532,7 @@ void rpc_close(Channel *channel)
       channel_decref(channel);

       if (channel->streamtype == kChannelStreamStdio) {
    -    multiqueue_put(main_loop.fast_events, exit_event, 0);
    +    multiqueue_put(main_loop.events, exit_event, 0);
       }
     }

...leads to hangs (waiting for input):

    [5/7] Building C object test/functiona...s/CMakeFiles/tty-test.dir/tty-test.c.o�[K
    [6/7] Linking C executable bin/tty-test�[K
    [6/7] Linking C executable bin/tty-test�[K
    [7/7] cd /home/travis/build/neovim/neo...ild/neovim/neovim/cmake/RunTests.cmake�[K

    No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
    Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received

    The build has been terminated
justinmk added a commit to justinmk/neovim that referenced this pull request Sep 19, 2018
closes neovim#8813
ref neovim#7813 (comment)
ref neovim#8088 (comment)

Sometimes ASan fails like this:

    = ==16820==ERROR: AddressSanitizer: SEGV on unknown address 0x000001baab50 (pc 0x00000044f3a1 bp 0x000000000001 sp 0x7fff7ddb6a60 T0)
    ...
    4 0xfbfae4 in xfree /home/travis/build/neovim/neovim/build/../src/nvim/memory.c:134:3
    5 0x120e948 in free_string_option /home/travis/build/neovim/neovim/build/../src/nvim/option.c:2207:5
    6 0x120de3d in free_all_options /home/travis/build/neovim/neovim/build/../src/nvim/option.c:923:9
    7 0xfc2441 in free_all_mem /home/travis/build/neovim/neovim/build/../src/nvim/memory.c:622:3
    8 0x12bbe6c in mch_exit /home/travis/build/neovim/neovim/build/../src/nvim/os_unix.c:153:3
    9 0x1092cc3 in exit_event /home/travis/build/neovim/neovim/build/../src/nvim/msgpack_rpc/channel.c:542:5
    10 0xa6b2d3 in multiqueue_process_events /home/travis/build/neovim/neovim/build/../src/nvim/event/multiqueue.c:150:7
    11 0xa64e2f in loop_poll_events /home/travis/build/neovim/neovim/build/../src/nvim/event/loop.c:65:3
    12 0x12a4ec0 in os_breakcheck /home/travis/build/neovim/neovim/build/../src/nvim/os/input.c:162:5
    13 0x1035f07 in line_breakcheck /home/travis/build/neovim/neovim/build/../src/nvim/misc1.c:2692:5
    ...
    19 0x137ac07 in vim_regexec_nl /home/travis/build/neovim/neovim/build/../src/nvim/regexp.c:7302:10
    20 0x910f2b in f_split /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:15673:17
    ...
    43 0x11667d5 in normal_check /home/travis/build/neovim/neovim/build/../src/nvim/normal.c:1325:5
    44 0x17774c1 in state_enter /home/travis/build/neovim/neovim/build/../src/nvim/state.c:28:35
    45 0x10c0bf4 in normal_enter /home/travis/build/neovim/neovim/build/../src/nvim/normal.c:467:3
    46 0xea98a2 in main /home/travis/build/neovim/neovim/build/../src/nvim/main.c:566:3
    47 0x7fbb0a667f44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287
    48 0x44e39b in _start (/home/travis/build/neovim/neovim/build/bin/nvim+0x44e39b)

Discussion:
- `free_all_options` is free'ing something before it was alloc'd.
    - ~~Options init isn't complete?~~ (No: init completed, `main.c`
    reached `normal_enter()`)
- stdio RPC channel was closed (so `rpc_close` schedules `exit_event`)
    - was this because the client died from a invalid message?
-  `exit_event` is scheduled on `main_loop.fast_events`.
    - would `main_loop.events` defer it? Or do we need something like
    `stuffReadbuff(":qall!\n")`?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ux user experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants