aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/tui
Commit message (Collapse)AuthorAge
...
* | | TUI: force italics in tmuxJustin M. Keyes2019-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | TUI: italics in Terminal.app (nsterm)Justin M. Keyes2019-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | ui/compositor: add redraws needed due to intersected doublewidth chars.Björn Linse2019-02-02
|/ /
* | win/TUI: fix text overrides line numbers #9474erw72019-01-09
| | | | | | fixes #9461
* | PVS/V751: tui.c, Parameter is not usedJustin M. Keyes2019-01-04
| | | | | | | | | | False positive. Documentation for grid_scroll says "`cols` is always zero, reserved for future use".
* | Merge #9425 'build: enable -Wshadow'Justin M. Keyes2019-01-03
|\ \
| * | UGRID_FOREACH_CELL: avoid shadowed variablesJustin M. Keyes2019-01-02
| | |
| * | build: enable -WshadowJustin M. Keyes2019-01-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note about shada.c: - shada_read_next_item_start was intentionally shadowing `unpacked` and `i` because many of the macros (e.g. ADDITIONAL_KEY) implicitly depended on those variable names. - Macros were changed to parameterize `unpacked` (but not `i`). Macros like CLEAR_GA_AND_ERROR_OUT do control-flow (goto), so any other approach is messy.
* | | TUI: Do not disable BCE for builtin terminfos (#9443)Justin M. Keyes2019-01-02
|/ / | | | | | | | | | | | | | | | | Remove this vestigial hack from #7624. Since 5a0d0286ff4d we blacklist BCE more surgically. And patch_terminfo_bugs() is the more appropriate place for that. ref 5749ecaf228f4a963a4e96ada831f902c73a1e80 ref #4210 #4421 #7035 #7337 #7381 #7425 #7618
* | TUI: Konsole DECSCUSR fixup (#9423)Justin M. Keyes2018-12-31
| | | | | | | | | | | | Apparently Konsole's terminfo is still broken. ref #9364 closes #9420
* | Merge #9408 from justinmk/tui-title-stackingJustin M. Keyes2018-12-31
|\ \ | | | | | | TUI: attempt "title stacking" unconditionally
| * | TUI: attempt "title stacking" unconditionallyJustin M. Keyes2018-12-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework #9407: save/restore title/icon always (for all terminals). Works in tmux, iTerm2, xterm, and any other terminal that supports title-stacking. Test case (title is "foo" while running, then restored after exit): tmux nvim -u NONE +'set title titlestring=foo' :q closes #4063
* | | Merge #9401 from justinmk/pr-win-erw7Justin M. Keyes2018-12-30
|\ \ \ | |/ / |/| |
| * | win/TUI: ConEmu: get back_color_erase from terminfoJustin M. Keyes2018-12-30
| | | | | | | | | | | | | | | | | | We already set back_color_erase in our builtin terminfo (terminfo_defs.h:conemu_terminfo), so we don't need to set it explicitly in patch_terminfo_bugs().
| * | refactor: Extract os_tty_guess_term()Justin M. Keyes2018-12-30
| | | | | | | | | | | | | | | - Also remove feature-detection of uv_set_vterm_state(): instead, on Windows we always require libuv to have that function.
| * | update_terminfo.sh: NOLINT data arraysJustin M. Keyes2018-12-28
| | |
| * | Merge 'upstream/master' into pr-win-erw7Justin M. Keyes2018-12-27
| |\ \
| * | | win/TUI: Fix scroll on Windows legacy consoleerw72018-12-27
| | | |
| * | | win/TUI: ConEmu: set immediate_wrap_after_last_column #9094erw72018-12-27
| | | |
| * | | win/TUI: builtin terminfos for cygwin, conemu, et al.erw72018-12-27
| | | |
| * | | win/TUI: SetConsoleMode() to override libuv #9094erw72018-12-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use uv_set_vterm_state() to override libuv's guess. See https://github.com/libuv/libuv/pull/1873/ for discussion. This commit uses a terminal-detection approach based on GetProcessImageFileNameW(...), which will be reverted in the following commit. The approach was intended to handle the case of running in winpty (:terminal), but we will add $NVIM env var for that. Also add some support for ConEmu, cygwin.
* | | | TUI: enter/exit alternate screen with "title stacking" (#9407)Justin M. Keyes2018-12-29
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Works in iTerm2 and xterm. - patch_terminfo_bugs(): Add title-stacking sequences (\e[22t and \e[23t) to the overrides for iTerm2 and xterm. - Note: the builtins (terminfo_defs.h) for `iterm_256colour_terminfo` and `xterm_256colour_terminfo` already include the sequences. Test case (title should be "foo" after the final :q): TERM=iterm2 nvim -u NONE +'set title titleold=foo' :q TERM=iterm2 nvim -u NONE +'set title titlestring=zub' :q closes #4063
* | | TUI: TERM=nstermJustin M. Keyes2018-12-16
| | | | | | | | | | | | | | | | | | | | | Treat TERM=nsterm the same way in augment_terminfo() and patch_terminfo_bugs(). ref #9244 463d28cc8079
* | | TUI: detect BSD vt consoleJustin M. Keyes2018-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FreeBSD console sets TERM=xterm, but it does not support xterm features like cursor-shaping. GUI terminals typically set TERM=xterm-256color, so on FreeBSD we can guess that TERM=xterm is the degraded vt. OpenBSD console sets TERM=vt220 https://github.com/openbsd/src/blob/master/etc/etc.amd64/ttys NetBSD console sets TERM=vt100 https://github.com/NetBSD/src/blob/trunk/etc/etc.amd64/ttys closes #8644
* | | Merge pull request #9368 from bfredl/doublewrapBjörn Linse2018-12-15
|\ \ \ | | | | | | | | TUI: handle wrap of doublewidth chars correctly
| * | | TUI: handle wrap of doublewidth chars correctlyBjörn Linse2018-12-15
| | | |
* | | | TUI: Konsole 18.07.70 supports DECSCUSR (#9364)Justin M. Keyes2018-12-14
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | ref https://github.com/KDE/konsole/commit/b0d3d83eca4f523a9e4acd3989da6be96033536a KONSOLE_VERSION is exported as a numeric string (after removing the dots from the version string). ref #8300 closes #6778 closes #6798
* | | TUI: alacritty supports set_cursor_color #9353Patrice Peterson2018-12-11
| | | | | | | | | | | | | | | | | | | | | Feature was added in: https://github.com/jwilm/alacritty/pull/757 closes #9353
* | | TUI: don't use BCE with attributes affecting backgroundBjörn Linse2018-12-11
| | |
* | | TUI: set_underline_color: only support colon form #9279Daniel Hahler2018-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes https://github.com/neovim/neovim/issues/9270 --- Background info per egmontkob: https://github.com/neovim/neovim/issues/9270#issuecomment-441979176 For undercurl, the newly invented escape sequence is `4:3` strictly with a colon, as with a semicolon it means single underlined and italic. For colored underline, the newly invented escape sequence `58:...` is meant to follow the pattern of `38` and `48`. [ITU T.416](https://www.itu.int/rec/T-REC-T.416-199303-I/en) § 13.1.8 clearly specifies the colon only as the separator (and the well-known ECMA-48 § 8.3.117 just points to this standard). Using semicolon instead was/is a frequent misinterpretation of this standard, and is commonly used in the wild – for 38 and 48. More and more emulators are catching up and beginning to support colon, in addition to semicolon. Semicolon is pretty fragile; in case an emulator doesn't recognize a sequence (let's say doesn't recognize the new extension of `58`), subsequent numbers are interpreted as other attributes. E.g. if 256-color mode is chosen then the next numeric parameter is `5` which turns on blinking. So, luckily, the standard is the technically better solution, the frequent practice of using semicolons is technically the worse. Therefore the direction we should be going is clear. I believe it's a fair requirement for anyone adopting colored underline to support colons too, and it's a reasonable move from applications to slightly push the world forward, force developers to catch up with the recent changes, that is: 1) recognize and at least ignore colon-delimited parameters even if they aren't supported, 2) recognize and support colon wherever they support the nonstandard semicolon instead. Should you come across any terminal emulator that supports 58 with semicolons but not with colons, I think the cleanest you can do is report a bug against them and ignore the problem; they should fix it. It's yet another common misunderstanding that the truecolor syntax is `38`/`48`/`58` followed by `:2:rrr:ggg:bbb`. The wording of T.416 is terrible, but if you read carefully, there's another parameter of color-space-id preceding the three color channels. Assuming you don't care about color-space-id, the syntax is `38`/`48`/`58` followed by `:2::rrr:ggg:bbb` and of course the trailing `m`. This is only for true-color, the 256-color format doesn't have such a parameter, it's `38`/`48`/`58` followed by `:5:index` and the final `m`.
* | | TUI: support TERM=nsterm (#9244)Justin M. Keyes2018-11-18
| | | | | | | | | | | | | | | | | | | | | `:help $TERM` recommends TERM=nsterm for Terminal.app but we did not actually support it. NB: We don't include a builtin term for Terminal.app, presumably because nsterm is commonly available on most systems (`infocmp nsterm`).
* | | TUI: attrs -> attr_id refactorBjörn Linse2018-11-11
| | |
* | | UI/TUI: improvements and cleanups for scrolling and clearingBjörn Linse2018-11-11
|/ / | | | | | | | | | | | | | | | | | | | | | | - TUI: _never_ rely on BCE for implicit clearing, only explicit commands. - TUI: use unibi_erase_chars when possible. - TUI: use end-exclusive ranges for invalid and cleared areas - screen: scrolling leaves scrolled in aree undefined. This is a conservative change, a client assuming the old semantics will still behave correctly. - screen: factor out vsep handling from line drawing. This is needed anyway for the multigrid refactor. - screen: simplifications of win_do_lines
* | TUI: Avoid reset_cursor_color in old VTE #9191Sam Wilson2018-11-03
| | | | | | | | closes #9089
* | tui.c: Fix ext.set_underline_color for !has_colon_rgbJustin M. Keyes2018-10-20
| | | | | | | | PVS/V523: The 'then' statement is equivalent to the 'else' statement.
* | Merge pull request #9079 from bfredl/tui_cursorBjörn Linse2018-10-09
|\ \ | | | | | | TUI cursor fixes: avoid memory errors after resize with invalid cursor position
| * | TUI: delete "first-row" workaround after resizeBjörn Linse2018-10-06
| | | | | | | | | | | | | | | This was caused by cursor position being invalid right after tui_grid_resize, which is now fixed
| * | TUI: always use safe cursor movement after resizeBjörn Linse2018-10-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code could lead to a memory error in the following situation: 0. The previous cursor position was row 50 since before, on a grid larger than 50 rows. 1. grid_resize changes the grid height to 40, and invalidly assumes the resize moved the physical cursor to row 0 2. Some event used a operation that could move the cursor (such as clear), and then reset the cursor to the "true" position row 50 (pointless after #8221, but I forgot to remove it) 3. raw_line/cheap_to_print is invoked, and tries to inspect the grid at row 50 (memory error) 4. grid_cursor_goto would have been called at this point, and set a valid cursor position 0-39.
* | | Merge #9036 'func_attr_printf'Justin M. Keyes2018-10-07
|\ \ \ | |/ / |/| |
| * | add func_attr_printf in :MichaHoffmann2018-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | log.c message.c strings.c fixed some printf warnings in: src/nvim/undo.c src/nvim/eval.c src/nvim/eval/encode.c src/nvim/eval/typval.c src/nvim/ex_getln.c src/nvim/fileio.c src/nvim/lua/executor.c src/nvim/main.c src/nvim/regexp_nfa.c src/nvim/shada.c src/nvim/spellfile.c src/nvim/tui/terminfo.c src/nvim/garray.h
* | | TUI: check libvte version for undercurl support #9088Daniel Hahler2018-10-05
| | | | | | | | | | | | | | | Support was added in https://github.com/GNOME/vte/commit/efaf8f3c. Fixes #9083
* | | TUI: fix support for undercurl/underline color #9080Daniel Hahler2018-10-03
| | |
* | | Merge pull request #9052 from blueyed/undercurlBjörn Linse2018-10-02
|\ \ \ | | | | | | | | tui: add support for undercurl and colored underline
| * | | tui: add support for undercurl and underline colorDaniel Hahler2018-10-01
| | | | | | | | | | | | | | | | Fixes https://github.com/neovim/neovim/issues/7479.
* | | | ui: rename ext_newgrid to ext_linegridBjörn Linse2018-10-01
| | | |
* | | | Revert "TUI: terminfo_start: use unibi_from_term directly"Justin M. Keyes2018-10-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If $TERM is not defined then unibi_from_term() would crash. Reverts 3bdc34d0657d223599afdf0ce9b072fafa3d5648. ref #9072
* | | | TUI: terminfo_start: use unibi_from_term directly (#9072)Daniel Hahler2018-09-30
|/ / / | | | | | | | | | | | | Avoids redundant call to `getenv("TERM")`. Ref: https://github.com/mauke/unibilium/blob/e3b16d6219ca1cb92d98b1d9cc416b49a3ac468e/uniutil.c#L203-L211
* | | tui: eliminate scrolling region data structureBjörn Linse2018-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | The scrolling region is always local to a single grid_scroll event, use local variables and parameters instead. The invocation of reset_scroll_region in grid_resize is cargo-culted to use margin reset under exactly the same circumstances, not sure if it is necessary though.
* | | tui: eliminate grid->attrs, use indexed cell->attrBjörn Linse2018-09-26
| | | | | | | | | | | | remove dead ugrid_put
* | | TUI: Alacritty supports DECSCUSR (#9048)Christian Duerr2018-09-25
| | | | | | | | | Alacritty may set TERM to"alacritty" or "alacritty-direct" if it finds its terminfo.