aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/tui
Commit message (Collapse)AuthorAge
...
* | 'guicursor': TMUX_WRAP iTerm seqs. Do color seq before shape seq.Justin M. Keyes2017-04-30
| |
* | 'guicursor': No color/blink by defaultJustin M. Keyes2017-04-30
| | | | | | | | Closes #6577
* | event: Remove "priority" concept.Justin M. Keyes2017-04-28
| | | | | | | | It was replaced by the "child queue" concept (MultiQueue).
* | api: nvim_get_mode()Justin M. Keyes2017-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Asynchronous API functions are served immediately, which means pending input could change the state of Nvim shortly after an async API function result is returned. nvim_get_mode() is different: - If RPCs are known to be blocked, it responds immediately (without flushing the input/event queue) - else it is handled just-in-time before waiting for input, after pending input was processed. This makes the result more reliable (but not perfect). Internally this is handled as a special case, but _semantically_ nothing has changed: API users never know when input flushes, so this internal special-case doesn't violate that. As far as API users are concerned, nvim_get_mode() is just another asynchronous API function. In all cases nvim_get_mode() never blocks for more than the time it takes to flush the input/event queue (~µs). Note: This doesn't address #6166; nvim_get_mode() will provoke #6166 if e.g. `d` is operator-pending. Closes #6159
* | api/ui: externalize tablineJustin M. Keyes2017-04-26
| | | | | | | | | | | | - Work with a bool[] array parallel to the UIWidget enum. - Rename some functions. - Documentation.
* | api/ui: externalize tablineDongdong Zhou2017-04-26
| |
* | tui: Only set cursor color if the highlight group is valid (#6585)James McCoy2017-04-25
| | | | | | Closes #6584
* | tui/input.c: Use default 'ttimeoutlen' if option get fails.Justin M. Keyes2017-04-23
| | | | | | | | | | | | Should never happen, but better to be explicit. Helped-by: oni-link <knil.ino@gmail.com>
* | api_clear_error()Justin M. Keyes2017-04-23
| |
* | api: Do not truncate errors <1 MB. #6237Sander Bosma2017-04-23
| | | | | | | | Closes #5984
* | 'guicursor': iTerm: Set cursor color.Justin M. Keyes2017-04-22
| | | | | | | | | | iTerm uses proprietary escape codes to set cursor color. https://www.iterm2.com/documentation-escape-codes.html
* | Merge #6539 'More cursor shape modes'Justin M. Keyes2017-04-21
|\ \
| * | ui: use an array for mode stylesBjörn Linse2017-04-21
| | |
| * | ui: support more cursor shape modesBjörn Linse2017-04-21
| | | | | | | | | | | | throttle unneccessary cursor shape events
* | | *: Add comment to all C filesZyX2017-04-19
|/ /
* | 'guicursor': enabled=false if 'guicursor' is emptyJustin M. Keyes2017-04-04
| | | | | | | | | | Closes #6429 Closes #6430
* | api/cursor_style_set: mode descriptionsJustin M. Keyes2017-04-01
| |
* | 'guicursor': Empty means "block cursor in all modes".Justin M. Keyes2017-04-01
| | | | | | | | Also: update default 'guicursor' to match the documentation.
* | tui: 'guicursor' colorMatthieu Coudron2017-04-01
| | | | | | | | | | | | For now only supports valid hex colors (does not check for the validity the hex color) when termguicolors is set, otherwise it won't attempt to change the cursor color.
* | tui: 'guicursor' shape #6044Matthieu Coudron2017-04-01
| | | | | | | | Closes #2583
* | tui: Only enable/disable mouse when there's something to do (#6411)James McCoy2017-04-02
| | | | | | | | | | | | | | 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
* | ascii: Readd DEL_STR defineZyX2017-03-29
| |
* | tui.c: Handle missing "key_dc" terminfo entry (#6128)svaante2017-02-16
| | | | | | Closes #6025
* | Revert "tui: update_size(): Fix race condition."Justin M. Keyes2017-02-04
| | | | | | | | This reverts commit 0e75438a388f91c6219d2f22ade0472b067f5dca.
* | tui: update_size(): Fix race condition.Justin M. Keyes2017-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bridge.width and bridge.height reach ui.c:ui_refresh() when it iterates through all UIs, so they do not need to be set directly by tui.c:update_size(). Race found by helgrind: ==18532== Helgrind, a thread error detector ==18532== Copyright (C) 2007-2015, and GNU GPL'd, by OpenWorks LLP et al. ==18532== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info ==18532== Command: ./build/bin/nvim -u NONE --cmd set\ rtp+=~/.vim/bundle/vimfiler.vim,~/.vim/bundle/unite.vim --cmd runtime\ plugin/vimfiler.vim --cmd runtime\ plugin/unite.vim ==18532== Parent PID: 6477 ==18532== ==18532== ---Thread-Announcement------------------------------------------ ==18532== ==18532== Thread #2 was created ==18532== at 0x68FA98E: clone (clone.S:73) ==18532== by 0x5270179: create_thread (createthread.c:102) ==18532== by 0x5271BE2: pthread_create@@GLIBC_2.2.5 (pthread_create.c:679) ==18532== by 0x4C32B07: pthread_create_WRK (hg_intercepts.c:427) ==18532== by 0x4E53A3F: uv_thread_create (in /usr/lib/x86_64-linux-gnu/libuv.so.1.0.0) ==18532== by 0x6A7154: ui_bridge_attach (ui_bridge.c:89) ==18532== by 0x6A164C: tui_start (tui.c:116) ==18532== by 0x6A4CFC: ui_builtin_start (ui.c:89) ==18532== by 0x55A825: main (main.c:433) ==18532== ==18532== ---Thread-Announcement------------------------------------------ ==18532== ==18532== Thread #1 is the program's root thread ==18532== ==18532== ---------------------------------------------------------------- ==18532== ==18532== Possible data race during write of size 4 at 0x770E7B4 by thread #2 ==18532== Locks held: none ==18532== at 0x6A3071: update_size (tui.c:759) ==18532== by 0x6A30DB: sigwinch_cb (tui.c:269) ==18532== by 0x4D0A54: signal_event (signal.c:44) ==18532== by 0x4CDDB6: multiqueue_process_events (multiqueue.c:146) ==18532== by 0x4CD135: loop_poll_events (loop.c:56) ==18532== by 0x6A2451: tui_main (tui.c:239) ==18532== by 0x6A857A: ui_thread_run (ui_bridge.c:112) ==18532== by 0x4E539F6: ??? (in /usr/lib/x86_64-linux-gnu/libuv.so.1.0.0) ==18532== by 0x4C32D06: mythread_wrapper (hg_intercepts.c:389) ==18532== by 0x5271423: start_thread (pthread_create.c:333) ==18532== by 0x68FA9BE: clone (clone.S:105) ==18532== ==18532== This conflicts with a previous read of size 4 by thread #1 ==18532== Locks held: none ==18532== at 0x6A542A: ui_refresh (ui.c:169) ==18532== by 0x6A5870: ui_refresh_event (ui.c:181) ==18532== by 0x4CDDB6: multiqueue_process_events (multiqueue.c:146) ==18532== by 0x4CD135: loop_poll_events (loop.c:56) ==18532== by 0x5DEDB4: os_breakcheck (input.c:150) ==18532== by 0x59263D: line_breakcheck (misc1.c:2667) ==18532== by 0x621AE5: nfa_regmatch (regexp_nfa.c:6171) ==18532== by 0x61DCF7: nfa_regtry (regexp_nfa.c:6240) ==18532== Address 0x770e7b4 is 4 bytes inside a block of size 352 alloc'd ==18532== at 0x4C2EFE5: calloc (vg_replace_malloc.c:711) ==18532== by 0x57C962: xcalloc (memory.c:119) ==18532== by 0x6A6E29: ui_bridge_attach (ui_bridge.c:53) ==18532== by 0x6A164C: tui_start (tui.c:116) ==18532== by 0x6A4CFC: ui_builtin_start (ui.c:89) ==18532== by 0x55A825: main (main.c:433) ==18532== Block was alloc'd by thread #1 ==18532== ==18532== ---------------------------------------------------------------- ==18532== ==18532== Possible data race during write of size 4 at 0x770E7B8 by thread #2 ==18532== Locks held: none ==18532== at 0x6A3085: update_size (tui.c:760) ==18532== by 0x6A30DB: sigwinch_cb (tui.c:269) ==18532== by 0x4D0A54: signal_event (signal.c:44) ==18532== by 0x4CDDB6: multiqueue_process_events (multiqueue.c:146) ==18532== by 0x4CD135: loop_poll_events (loop.c:56) ==18532== by 0x6A2451: tui_main (tui.c:239) ==18532== by 0x6A857A: ui_thread_run (ui_bridge.c:112) ==18532== by 0x4E539F6: ??? (in /usr/lib/x86_64-linux-gnu/libuv.so.1.0.0) ==18532== by 0x4C32D06: mythread_wrapper (hg_intercepts.c:389) ==18532== by 0x5271423: start_thread (pthread_create.c:333) ==18532== by 0x68FA9BE: clone (clone.S:105) ==18532== ==18532== This conflicts with a previous read of size 4 by thread #1 ==18532== Locks held: none ==18532== at 0x6A5455: ui_refresh (ui.c:170) ==18532== by 0x6A5870: ui_refresh_event (ui.c:181) ==18532== by 0x4CDDB6: multiqueue_process_events (multiqueue.c:146) ==18532== by 0x4CD135: loop_poll_events (loop.c:56) ==18532== by 0x5DEDB4: os_breakcheck (input.c:150) ==18532== by 0x59263D: line_breakcheck (misc1.c:2667) ==18532== by 0x621AE5: nfa_regmatch (regexp_nfa.c:6171) ==18532== by 0x61DCF7: nfa_regtry (regexp_nfa.c:6240) ==18532== Address 0x770e7b8 is 8 bytes inside a block of size 352 alloc'd ==18532== at 0x4C2EFE5: calloc (vg_replace_malloc.c:711) ==18532== by 0x57C962: xcalloc (memory.c:119) ==18532== by 0x6A6E29: ui_bridge_attach (ui_bridge.c:53) ==18532== by 0x6A164C: tui_start (tui.c:116) ==18532== by 0x6A4CFC: ui_builtin_start (ui.c:89) ==18532== by 0x55A825: main (main.c:433) ==18532== Block was alloc'd by thread #1
* | tui: Ignore DECRST 12 in terminfo's cursor_normal, if presentJames McCoy2017-01-25
| | | | | | | | | | | | | | | | | | | | | | | | As discussed in neovim/neovim#5977, it's typical for the terminfo database to disable cursor blink as part of setting up the normal cursor. Since this interferes with the user's control over the cursor, we'll skip over DECRST 12 if it starts the cursor_normal entry. Note, this doesn't handle any case where DECRST 12 is not at the start of the entry since unibilium simply stores the given pointer. We would need to allocate (and somewhere free) a modified copy of what we get back from unibi_get_str to handle that.
* | tui: Enable mode-sensitive cursor by default.Justin M. Keyes2017-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also give NVIM_TUI_ENABLE_CURSOR_SHAPE more granularity: 0 = do not change cursor shape 1 = non-blinking ("steady") cursor with mode-sensitive shape 2 = blinking cursor with mode-sensitive shape Note: blink state is not changed for Konsole, instead user's terminal preference makes the decision. (Can't do that for xterm-likes, DECSCUSR forces us to choose blink-state.) This is a temporary step until the TUI respects 'guicursor' Ref: https://github.com/neovim/neovim/issues/2583#issuecomment-272988384
* | tui: Do not decide cursor blinking.Justin M. Keyes2017-01-20
| | | | | | | | | | | | | | "CSI ? 12 l" stops cursor blinking. `unibi_cursor_normal` need only _show_ the cursor, not make any pronouncement about cursor blinking. User's terminal setting (or NVIM_TUI_ENABLE_CURSOR_SHAPE) takes precedence.
* | build: Do not check for obsolete <termio.h>Justin M. Keyes2016-12-24
| |
* | build: Support old libtermkey.Justin M. Keyes2016-12-24
| | | | | | | | Check TERMKEY_VERSION_* before referencing `TermKey_Terminfo_Getstr_Hook`.
* | tui: check stty/termios for kbsJustin M. Keyes2016-12-23
| | | | | | | | | | | | | | | | | | | | | | Requires libtermkey 0.19+ Closes #2048 Closes #5693 See https://github.com/neovim/libtermkey/compare/a9b61424aae9f7548162ff112393c5f706cf54f1%5E...c0eb4e4a05f49ad8fee0195c77f2c29d09cc36af See https://bugzilla.redhat.com/show_bug.cgi?id=142659 See https://github.com/tmux/tmux/blob/fe4e9470bb504357d073320f5d305b22663ee3fd/tty-keys.c#L625-L632
* | tui: "backpressure": Drop messages to avoid flooding.Justin M. Keyes2016-12-09
| | | | | | | | | | | | | | | | | | Closes #1234 multiqueue: - Implement multiqueue_size() - Rename MultiQueueItem.parent to MultiQueueItem.parent_item, to avoid confusion with MultiQueue.parent.
* | add cmdline mode to modechange of RPC and testschemzqm2016-11-30
| | | | | | | | | | | | | | | | use set_cursor_shape_bar for cmdline mode fix test of screen_basic_spec.lua & screen.lua comment fix
* | encoding: cleanup mbyte.c given fixed encoding=utf-8Björn Linse2016-11-05
| | | | | | | | | | | | | | | | | | Eliminate mb_init(): Set "enc_utf" and "has_mbyte" early. Eliminate "enc_unicode" and "enc_latin1like". init_chartab() and screenalloc() are already invoked elsewhere in the initialization process. The EncodingChanged autocmd cannot be triggered. At initialization, there is no spellfiles to reload
* | tui/suspend_event(): set STDIN to "blocking"Justin M. Keyes2016-11-02
| | | | | | | | | | | | | | | | | | | | | | Set STDIN to blocking on "suspend". This was missed in #2598. See 8a782f1699e2a59a3f3e91f6d7c35a3312b82b41. Also on "continue"/SIGCONT explicitly set STDIN back to NON-blocking. We don't explicitly do that on *startup* (libuv does it internally), but on "continue" it seems wise to restore libuv's expectations. Closes #5459
* | Revert "tui: Move ui_bridge module to tui/ namespace."Justin M. Keyes2016-10-13
| | | | | | | | | | | | ui_bridge.c is useful for libnvim consumers, not just the built-in TUI. This reverts commit beb2e4f095583af09ebe9c66e3bf453b61511f23.
* | tui/flush_buf: Don't toggle cursor when called from out() #5436Florian Larysch2016-10-06
| | | | | | | | | | | | | | | | | | | | | | unibi_format() calls out() multiple times for a given format string. When data->buf fills up during this process, flush_buf() gets called, which possibly calls unibi_out() again to toggle the cursor visibility. However, if we were halfway through outputting an escape sequence, doing this will clobber it, resulting in junk being displayed. Fix this by not toggling the cursor visibility when draining a full buffer in out().
* | tui/terminfo_start: Default to normal-mode cursor shape. (#5419)Justin M. Keyes2016-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | References #4867 For users who use a "bar" shape in the shell, it's annoying that Nvim starts with that same cursor shape, despite starting in normal-mode. So default to the normal-mode "block" shape instead. (Note: technically it's possible some user may set 'insertmode', and then the opposite problem occurs. But 'insertmode' is a silly option that shouldn't exist, and any user that uses it probably isn't fiddling with their cursor shape anyways.) Also rename the unibilium extensions: enter_insert_mode => set_cursor_shape_bar enter_replace_mode => set_cursor_shape_underline exit_insert_mode => set_cursor_shape_block to say explicitly what they do in the context of a terminal; it's irrelevant in this context what purpose they serve in Nvim.
* | event/multiqueue.c: Rename "queue" to "multiqueue".Justin M. Keyes2016-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | `lib/queue.h` implements a basic queue. `event/queue.c` implements a specialized data structure on top of lib/queue.h; it is not a "normal" queue. Rename the specialized multi-level queue implemented in event/queue.c to "multiqueue", to avoid confusion when reading the code. Before this change one can eventually notice that "macros (uppercase symbols) are for the normal queue, lowercase operations are for the multi-level queue", but that is unnecessary friction for new developers (or existing developers just visiting this part of the codebase).
* | tui: Move ui_bridge module to tui/ namespace.Justin M. Keyes2016-09-28
| |
* | doc: minor comment tweaksJustin M. Keyes2016-09-28
| |
* | tui.c: Do not wait for tui loop on teardown. (#4789)Justin M. Keyes2016-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because terminfo_stop() already ran, there is not much reason to wait for the loop to teardown. Helped-by: Björn Linse <bjorn.linse@gmail.com> Helped-by: oni-link <knil.ino@gmail.com> Closes #4778 References #3541 --- Bug report: > After pressing `ZZ` I can find two threads freezing, occupying 100% CPU: |-systemd-+ |-nvim,11567 /home/lz/code/1.rs +set title | `-{nvim},11574 > 11567 has two threads: (gdb) info threads Id Target Id Frame * 1 Thread 0x7f7622907780 (LWP 11567) "nvim" 0x00007f76222e66bd in pthread_join () from /usr/lib/libpthread.so.0 2 Thread 0x7f761f5ff700 (LWP 11574) "nvim" 0x00007ffcec9e9c59 in clock_gettime () (gdb) thread apply all bt Thread 2 (Thread 0x7f761f5ff700 (LWP 11574)): #0 0x00007ffcec9e9c59 in clock_gettime () #1 0x00007f76210b9356 in clock_gettime () from /usr/lib/libc.so.6 #2 0x00007f7622513e3c in ?? () from /usr/lib/libuv.so.1 #3 0x00007f7622505e94 in uv_run () from /usr/lib/libuv.so.1 #4 0x00000000004822ed in loop_close (loop=loop@entry=0x7f761f5fe870) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/event/loop.c:87 #5 0x00000000005a7ec0 in tui_main (bridge=0x7f761f6ac000, ui=0x7f761f69ace0) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/tui/tui.c:234 #6 0x00000000005a9b47 in ui_thread_run (data=<optimized out>) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/ui_bridge.c:87 #7 0x00007f7622510d07 in ?? () from /usr/lib/libuv.so.1 #8 0x00007f76222e5474 in start_thread () from /usr/lib/libpthread.so.0 #9 0x00007f76210ac69d in clone () from /usr/lib/libc.so.6 Thread 1 (Thread 0x7f7622907780 (LWP 11567)): #0 0x00007f76222e66bd in pthread_join () from /usr/lib/libpthread.so.0 #1 0x00007f7622510dae in uv_thread_join () from /usr/lib/libuv.so.1 #2 0x00000000005aac9e in ui_bridge_stop (b=0x7f761f6ac000) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/ui_bridge.c:104 #3 0x00000000005a90e4 in ui_builtin_stop () at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/ui.c:91 #4 0x000000000052be09 in mch_exit (r=r@entry=1) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/os_unix.c:143 #5 0x00000000004db1cc in getout (exitval=exitval@entry=1) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/main.c:623 #6 0x00000000004fa43c in preserve_exit () at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/misc1.c:2652 #7 0x000000000052b77a in deadly_signal (signum=1) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/os/signal.c:120 #8 0x000000000052b7cf in on_signal (handle=<optimized out>, signum=<optimized out>, data=<optimized out>) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/os/signal.c:145 #9 0x0000000000484178 in signal_event (argv=<optimized out>) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/event/signal.c:44 #10 0x0000000000483b7f in queue_process_events (queue=0x7f7620417360) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/event/queue.c:142 #11 0x0000000000482208 in loop_poll_events (loop=0x84dec0 <loop>, ms=ms@entry=4000) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/event/loop.c:56 #12 0x000000000052a364 in input_poll (ms=ms@entry=4000) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/os/input.c:325 #13 0x000000000052a3e2 in inbuf_poll (ms=4000) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/os/input.c:347 #14 0x000000000052a839 in os_inchar (buf=buf@entry=0x0, maxlen=maxlen@entry=0, ms=ms@entry=-1, tb_change_cnt=tb_change_cnt@entry=0) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/os/input.c:107 #15 0x0000000000592eeb in state_enter (s=s@entry=0x7ffcec9d3560) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/state.c:46 #16 0x0000000000508533 in normal_enter (cmdwin=cmdwin@entry=false, noexmode=noexmode@entry=false) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/normal.c:464 #17 0x00000000004dc17e in main (argc=<optimized out>, argv=<optimized out>) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/main.c:538
* | ui_detach: Schedule refresh on main loop.Justin M. Keyes2016-09-22
| | | | | | | | Closes #4163
* | refactor: eliminate misc2.cJustin M. Keyes2016-09-13
| | | | | | | | | | | | | | | | | | | | move `call_shell` to misc1.c Move some fns to state.c Move some fns to option.c Move some fns to memline.c Move `vim_chdir*` fns to file_search.c Move some fns to new module, bytes.c Move some fns to fileio.c
* | api: consistently use nvim_ prefix and update documentationBjörn Linse2016-08-31
| |
* | api/ui: use ui options instead of one method per featureBjörn Linse2016-08-29
| | | | | | | | Use new nvim_ui_ prefix to avoid breaking change.
* | api/ui: allow popupmenu to be drawn by external uiBjörn Linse2016-08-29
| |
* | stream: set data together with callbackBjörn Linse2016-08-20
|/
* tui: Assume 256 colors in most cases.Justin M. Keyes2016-07-03
| | | | | | | | Assume 256 colors if: - $TERM contains "xterm" or "256" - $COLORTERM contains "256" Closes #2912
* options: Set 't_Co' from unibilium + fix_terminfo.Mateusz Czaplinski2016-07-02
| | | | | | | | | | | | | | | | | Closes #3428 References #4999 The Linux "virtual consoles" available on Alt-F1...Alt-F7 (i.e. tty1-tty7) support only 8 colors (actually, it's 16 colors when counted together with "bold/bright" attribute) and 8 background colors (those in some cases can be upped to 16 too, by using "blink" attribute - but this might be more risky, in case some legacy consoles really show it as blinking? I'm not sure about that.) This limit is buried deep in kernel sources for default tty drivers. Trying to use the Neovim's default 256 colors in this case gives totally bad colors, breaking all color schemes and sometimes rendering parts of the text invisible. A simple change enables code paths for handling 8/16 colors, which are still present in Neovim codebase.