aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/tui
Commit message (Collapse)AuthorAge
...
* TUI/paste: define paste function as Lua builtinJustin M. Keyes2019-08-27
| | | | | | | - Define in Lua so that it is compiled-in (available with `-u NONE`). TODO: Eventually we will want a 'pastefunc' option or some other way to override the default paste handler.
* TUI/paste: push bytes directly (avoid libtermkey)Justin M. Keyes2019-08-27
|
* TUI/paste: collect data, invoke user callback #4448ZyX2019-08-27
|
* paste: WIP #4448Justin M. Keyes2019-08-27
|
* tui: handle Smulx extension capability (extended underline) (#9097)Daniel Hahler2019-08-22
| | | | | | | | | This was added to ncurses terminfo for vte and tmux. Ref: https://github.com/tmux/tmux/issues/1492#issuecomment-427675180 Assumes color support is available when extended underline is supported. Ref: https://github.com/tmux/tmux/issues/1492#issuecomment-427803984
* TUI: do not use "starting" global mutated by main threadBjörn Linse2019-08-15
|
* terminfo_start: use unibi_from_term, skip without TERM (#10670)Daniel Hahler2019-08-02
| | | | | This is clearer/more explicit and avoids potential mismatch between what unibilium thinks vs what Nvim thinks. For reference: https://github.com/mauke/unibilium/blob/e3b16d6219ca1cb92d98b1d9cc416b49a3ac468e/uniutil.c#L203-L211
* env: invalid pointer after os_setenv() #10558erw72019-07-23
|
* win/TUI: workaround libuv LF => CRLF conversion #10558erw72019-07-23
| | | | | | Replace cud1 with \x1b[B because \n is CRLF on Windows (due to libuv). fix #9461
* tui: support rgba background detection (#10205)Harm te Hennepe2019-06-13
| | | Fixes https://github.com/neovim/neovim/issues/10159.
* TUI: set os/input.c:global_fd to input->in_fd #10174erw72019-06-10
| | | | | | | | | | | | | Problem: When we changed startup to wait for the TUI (like a remote UI), we forgot to set os/input.c:global_fd. That used to be done by input_start(). Solution: Initialize os/input.c:global_fd before initializing libtermkey (termkey_new_abstract) so that tui_get_stty_erase() and friends can inspect the correct fd. fixes #10134 close #10174
* Merge #9829 'startup: remove TUI init special-case'Justin M. Keyes2019-06-04
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes #7967 fixes #9959 Historically Vim/Nvim does backflips to handle input and show messages before a UI is available. This logical contradiction was already fixed for remote UIs (#9024 c236e80cf3df). Fixing it also for the TUI avoids problems on Windows, simplifies the logic, and avoids races like #9959. - Move ui_builtin_start() to the same position as embedded_mode remote_ui_wait_for_attach(). - If stdin is redirected, save the original `stdin` and replace fd 0 with tty before calling `ui_builtin_start()`.
| * [skip appveyor] Fix clint issueerw72019-06-04
| |
| * tui/input.c: Fix problem when stdin is not TTYerw72019-06-04
|/
* tui:cursor_goto(): remove dead code #9952Justin M. Keyes2019-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | fix #9918 ref dbc25f5a87cf3bcfe1caac1eb1ff8b3a6978a415 Before 7ede14d191b1 the UGRID_FOREACH_CELL loop was never entered, because it expanded to an always-false condition. From build/src/nvim/auto/tui/tui.i: do { UCell *row_cells = (grid)->cells[grid->row]; for (int col = grid->col; col < col; col++) { UCell *cell = row_cells + col; (void)(cell); { print_cell(ui, cell); }; } } while (0); After 7ede14d191b1 issue #9918 was reported. $ ./build/bin/nvim -Nu NONE +'colo evening' :h<tab> " causes cursor to change colors Since the code was dead before 7ede14d191b1, just remove it.
* win: stream_init() issue with tty on Windows #9884erw72019-04-28
| | | ref #9825
* tui/input.c: rename functionsJustin M. Keyes2019-03-25
| | | | | | | | - Rename the module prefix to "tinput_" instead of "term_input". - Some of the private functions were confusing, for example enqueue_input() calls input_enqueue() in another module. - It is helpful for discussion, documentation, and stacktraces if functions (even private) are globally unique.
* autocmd: rename: "++nested", "++once"Justin M. Keyes2019-03-14
| | | | | Based on feedback from upstream: https://github.com/vim/vim/pull/4100
* TUI/background detection: hook into VimEnter eventJustin M. Keyes2019-03-11
| | | | | | | | | | | If terminal response is received during startup, set 'background' from a nested "one-shot" (once) VimEnter autocmd. The previous not-so-clever "self-rescheduling" approach could cause a long delay at startup (event-loop does not make forward progress). fixes #9675 ref #9509
* tui_tk_ti_getstr: handle weird value #9688Boskovits2019-03-07
| | | | | | | | | tigetstr (used by libtermkey/driver-ti.c) may return -1 as a pointer. Documented in man 3 tigetstr. https://linux.die.net/man/3/tigetstr > The tigetstr routine returns the value (char *)-1 if capname is not a string > capability, or 0 if it is canceled or absent from the terminal description. Fixed #9687
* floats: implement floating windowsBjörn Linse2019-03-02
| | | | Co-Author: Dongdong Zhou <dzhou121@gmail.com>
* TUI: do not resize host-terminal on startup (#9645)Justin M. Keyes2019-02-25
| | | | | | ...unless the 'lines' and/or 'columns' options were set. ref 5732340c2035 fixes #5843
* TUI: rework background-color detectionJustin M. Keyes2019-02-22
| | | | | | | | | - Like Vim, use set_option_value() followed by reset_option_was_set(). - Do not use set_string_default(), so the default is predictable. This affects `:set bg&`. - Wait until end-of-startup (VimEnter) to handle the response. The response is racey anyways, so timing is irrelevant. This allows OptionSet to be triggered, unlike during startup.
* Merge #5027 'TUI: detect background color'Justin M. Keyes2019-02-17
|\
| * Merge #5027 'TUI: detect background color'Justin M. Keyes2019-01-17
| |\
| | * Automatically detect terminal background and set bg=dark or bg=lightJosh Triplett2016-07-24
| | | | | | | | | | | | | | | | | | | | | | | | xterm-compatible terminals support reporting their configured colors back to the application. Use this to obtain the current background color, compute its luminance to classify it as light or dark, and set 'bg' accordingly. Also set the default for 'bg', so that `:set bg&` will revert to that detected default.
* | | TUI: assume italics support in all xterm-likesJustin M. Keyes2019-02-12
| | | | | | | | | | | | | | | | | | https://github.com/neovim/neovim/issues/9598#issuecomment-462421302 > On systems other than macOS, terminfo always has them set. It's part > of the ANSI standard SGR codes
* | | TUI: sniff nsterm (Terminal.app) from $TERM_PROGRAMJustin M. Keyes2019-02-11
| | |
* | | 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