tmux users are encouraged to use "tmux-256color" instead of the old
"screen-256color". Put this in your .tmux.conf :
if-shell 'infocmp tmux-256color' 'set -g default-terminal "tmux-256color"' 'set -g default-terminal "screen-256color"'
If default-terminal is "tmux-256color" AND tmux finds its terminfo, THEN
it will enable italics (regardless of whether the terminfo contains
sitm/ritm).
OTHERWISE tmux "emulates screen", which means it emits italics as
"reverse". That's unfortunate, but it's an acceptable compromise that
allows Nvim to support italics in tmux by default in compatible (and
increasingly-common) configurations.
Test case:
tmux
nvim -u NORC +'hi Comment cterm=italic' CMakeLists.txt
ref #9598
This is the conservative approach, requiring TERM=nsterm as recommended
at `:help $TERM`. It won't work with Terminal.app's default of
TERM=xterm-256color, nor in tmux.
Test case:
TERM=nsterm nvim -u NORC +'hi Comment cterm=italic' CMakeLists.txt
closes#9598
Loading existing files into a buffer is non-trivial and requires a window.
Creating an unnamed emtpy buffer is trivial and safe though, thus worth a
special case.
Change nvim_buf_set_option to use aucmd_prepbuf. This is necessary
to allow some options to be set on a not yet displayed buffer, such
as 'buftype' option.
vim-patch:7.4.1858: Add BLN_NEW to enforce buflist_new creating new buffer
grid_xx functions shouldn't randomly be called when the screen is not valid.
Nvim deterministically initializes a default screen early in main(), so the
default grid can be assumed to be allocated.
Why?
- Because we can.
- Because the TUI is just another GUI™
- Because it looks kinda nice, and provides useful context like 1 out of 100
times
Complies with "don't pay for what you don't use".
Some crashes for resizing were unfolded, add tests for those.
Makes the 'scrollback' option more consistent (same default for all buffers) and future-proof.
- Default to -1 for all buffers, but treat it as an implementation detail.
- Document range of 1 - 100_000.
- New terminal buffer by default sets scrollback=10_000 if the global default is -1.
- Existing terminal buffer: On entering terminal-mode or on refresh, if the user explicitly did `:set[local] scbk=-1`, the local value goes to 100_000 (max). (This is undocumented on purpose. Users should work with explicit values in the range of 1-100_000.)
Problem: No debugger making use of the terminal window.
Solution: Add the term debugger plugin. So far only displays the current
line when stopped.
fe386641b0
Initially we will use this for the popupmenu, floating windows will
follow soon
NB: writedelay + compositor is weird, we need more flexible
redraw introspection.