aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ui.c
Commit message (Collapse)AuthorAge
...
* *: Fix new linter errorsZyX2016-06-11
|
* *: Fix errors from new linter checksZyX2016-06-11
|
* Merge pull request #4817 from bfredl/remoteuiJustin M. Keyes2016-05-27
|\ | | | | api: refactor remote ui to use API dispatch generation
| * api: refactor remote ui to use API dispatch generationBjörn Linse2016-05-27
| |
* | Windows: Don't build the TUI is systems where it is not supportedRui Abreu Ferreira2016-05-27
|/ | | | | | The TUI can be enabled/disabled at build time with -DFEAT_TUI, default is ON for UNIX, and OFF for non UNIX. When off, Neovim prints a message to stderr, along with a list of the server endpoints.
* syntax: Add support for the "special" color used for undercurlsAdnoC2016-05-17
|
* MSVC: Fix UI_CALL macro for MSVC.Rui Abreu Ferreira2015-12-22
| | | | | | | The UI_CALL macro uses variadic macros and relies on the non standard GCC extension. MSVC already applies similar behavior for the regular __VA_ARGS__ removing the comma. In MSVC UI_CALL can be implemented by calling UI_CALL_MORE directly.
* encoding: simplify handling of encoding in TUIBjörn Linse2015-09-08
|
* Notify attached UIs whenever menus changeRobin Allen2015-08-21
| | | | | This adds a redraw notification "update_menu" which is sent whenever Vim's menus are changed by the :menu command and friends.
* event: Refactor async event processingThiago de Arruda2015-08-13
| | | | | | | | | | - Improve the implementation of deferred/immediate events. - Use the new queue module to change how/when events are queued/processed by giving a private queue to each emitter. - Immediate events(which only exist to break uv_run recursion) are now represented in the `loop->fast_events` queue. - Events pushed to child queues are propagated to the event loop main queue and processed as K_EVENT keys.
* tui: Use underline cursor in Replace modeOmar Sandoval2015-07-26
| | | | | | | This is a port of my original contribution to Vim, added in 7.4.687 (https://github.com/vim/vim/commit/v7-4-687). The TUI code has been heavily refactored (see esp. 25ceadab37edba13f5afa78d8b4723da03ef35f0), so this required some translation, but the logic is the same.
* api: Simplify UI API on mode changeOmar Sandoval2015-07-26
| | | | | | | Currently, there are two functions in the UI API that are called when the mode changes: insert_mode() and normal_mode(). These can be folded into a single mode_change() entrypoint which can do whatever it wants based on the mode it is passed, limited to INSERT and NORMAL for now.
* event loop: New abstraction layer with refactored time/signal APIThiago de Arruda2015-07-17
| | | | | | | | | | - Add event loop abstraction module under src/nvim/event. The src/nvim/event/loop module replaces src/nvim/os/event - Remove direct dependency on libuv signal/timer API and use the new abstraction instead. - Replace all references to uv_default_loop() by &loop.uv, a new global variable that wraps libuv main event loop but allows the event loop functions to be reused in other contexts.
* tui: make termkey use utf-8 mode when &encoding=utf-8 #2469Björn Linse2015-06-13
|
* ui: Schedule screen refreshs to run in the event loopThiago de Arruda2015-03-25
| | | | | This is required to avoid event loop recursion due to indirect calls to os_breakcheck by screenalloc
* ui: Refactor so that busy state won't be the defaultThiago de Arruda2015-03-18
| | | | | | | | | | | Even though assuming nvim is busy most times is simpler, it has a problem: A lot of unnecessary busy_start/busy_stop notifications are sent to the UI. That's because in the majority of scenarios almost no time is spent between `event_poll` calls. This restores the normal behavior which is to call busy_start only when nvim is going to perform some task that can take a significant amount of time. Also improve the usage of buffering in the TUI when changing the cursor state.
* ui: Only call ui_flush when the busy state changesThiago de Arruda2015-03-16
| | | | | Also add back the `ui_flush` call to `get_keystroke`. Its necessary to display prompt messages correctly.
* ui: Replace cursor_{on,off} by busy_{stop,start}Thiago de Arruda2015-03-15
| | | | | | | | | | | | | | | | | | | | | | | | Switching cursor off is only necessary in two occasions: - When redrawing to avoid terminal flickering - When the editor is busy The first can now be handled by the TUI, so most calls to ui_cursor_off can be removed from the core. So, before this commit it was only necessary to switch the cursor off to notify the user that nvim was running some long operation. Now the cursor_{on,off} functions have been replaced by busy_{stop,start} which can be handled in a UI-specific way(turning the cursor off or showing a busy indicator, for example). To make things even more simpler, nvim is always busy except when waiting for user input or other asynchronous events: It automatically switches to a non-busy state when the event loop is about to be entered for more than 100 milliseconds. `ui_busy_start` can be called when its not desired to change the busy state in the event loop (As its now done by functions that perform blocking shell invocations).
* illumos requires the use of limits.h for things like INT_MAX #2049Mike Zeller2015-02-26
|
* refactor: Remove term modules and termcap optionsThiago de Arruda2015-02-21
| | | | | | | | | | | | | | | - Removed term.c, term.h and term_defs.h - Tests for T_* values were removed. screen.c was simplified as a consequence(the best strategy for drawing is implemented in the UI layer) - Redraw functions now call ui.c functions directly. Updates are flushed with `ui_flush()` - Removed all termcap options(they now return empty strings for compatibility) - &term/&ttybuiltin options return a constant value(nvim) - &t_Co is still available, but it mirrors t_colors directly - Remove cursor tracking from screen.c and the `screen_start` function. Now the UI is expected to maintain cursor state across any call, and reset it when resized. - Remove unused code
* Enable -Wconversion: ui.c.Eliseo Martínez2015-02-18
| | | | | | | | | | | | | | | Refactoring summary: - ui_write(): len: int --> size_t * parse_abstract_ui_codes(): len: int --> size_t * string_convert(): lenp: int * --> size_t * - string_convert_ext(): lenp : int * --> size_t * unconvlenp: int * --> size_t * * utf8len_tab_zero: char[] --> uint8_t[] * iconv_string(): slen : int --> size_t unconvlenp: int * --> size_t * resultlenp: int * --> size_t * - mch_print_text_out(): len: int --> size_t * out_pos: int --> size_t
* syntax: Refactor to store all term and gui attributes independentlyThiago de Arruda2015-02-16
| | | | | Now the attrentry_T structure will store all attributes in separate fields for cterm and rgb UIs.
* ui: Rewrite the builtin terminal UIThiago de Arruda2015-02-16
| | | | | Now all terminal-handling code was moved to src/nvim/tui, which implements a new terminal UI based on libtermkey and unibilium
* ui: Remove/adapt some old code for a big UI refactorThiago de Arruda2015-02-16
| | | | | | | | | | | | | - Remove abstract_ui global, now it is always active - Remove some terminal handling code - Remove unused functions - Remove HAVE_TGETENT/TERMINFO/TERMIOS/IOCTL #ifdefs - Remove tgetent/terminfo from version.c - Remove curses/terminfo dependencies - Only start/stop termcap when starting/exiting the program - msg_use_printf will return true if there are no attached UIs( messages will be written to stdout) - Remove `ex_winpos`(implement `:winpos` with `ex_ni`)
* ui: Remove redundant cursor_goto callsThiago de Arruda2015-02-16
|
* ui: Implement set_{title,icon}Thiago de Arruda2015-01-14
|
* main: Fix color schemes for abstract_uiThiago de Arruda2015-01-13
| | | | | | | | | - Set 't_Co' to 256 at startup. The value can be changed by the user for compatibility with terminals that are less capable. - `has('gui_running')` will return 1 if at least one rgb UI is attached. Even though these changes are hacky, they are necessary to make the transition to the new UI architecture smoother.
* ui: Fix redraw bug caused by race conditions with remote clientsThiago de Arruda2015-01-13
| | | | | Before sending a resize command to the UIs, flush the current output buffer to ensure no redraw commands for a screen with invalid size are processed.
* ui: Use ui_linefeed to handle line breaks correctlyThiago de Arruda2015-01-13
| | | | | ui_linefeed will scroll the screen when it becomes full. This can happen when executing external commands.
* ui: Fix out_flush/ui_write behavior to always flush for abstract_uiThiago de Arruda2015-01-13
|
* ui: Fix `:suspend` command for remote UIsThiago de Arruda2015-01-13
| | | | | Forward the command to the remote UI and flush immediately. The semantics/handling is UI-specific.
* ui: Don't parse abstract_ui codes if there are no attached UIsThiago de Arruda2015-01-13
|
* ui: Add 'rgb' parameter to ui_attachThiago de Arruda2015-01-13
| | | | When set to false, nvim will send cterm color numbers with `highlight_set`.
* ui: Merge standout and reverse into one attributeThiago de Arruda2015-01-13
|
* ui: Fix ui resizing and change some method namesThiago de Arruda2015-01-13
|
* ui: Increase cursor row when text being rendered would cross its limitThiago de Arruda2015-01-13
|
* ui: Add update_fg/update_bg methodsThiago de Arruda2015-01-13
| | | | | It is necessary to notify the UI when the default background/foreground colors change in order to render correctly.
* Revert "[WIP] "abstract_ui" fixes and improvements"Justin M. Keyes2015-01-12
|
* Merge pull request #1657 from tarruda/abstract-ui-fixesJustin M. Keyes2015-01-12
|\ | | | | [WIP] "abstract_ui" fixes and improvements
| * ui: Fix redraw bug caused by race conditions with remote clientsThiago de Arruda2015-01-12
| | | | | | | | | | Before sending a resize command to the UIs, flush the current output buffer to ensure no redraw commands for a screen with invalid size are processed.
| * ui: Use ui_linefeed to handle line breaks correctlyThiago de Arruda2015-01-12
| | | | | | | | | | ui_linefeed will scroll the screen when it becomes full. This can happen when executing external commands.
| * ui: Fix out_flush/ui_write behavior to always flush for abstract_uiThiago de Arruda2015-01-12
| |
| * ui: Reimplement `:suspend` command for remote UIs.Thiago de Arruda2015-01-12
| | | | | | | | | | | | - Remove suspend method from the UI protocol - Handle `:suspend` by disconnecting the last channel that sent a request to nvim.
| * ui: Don't parse abstract_ui codes if there are no attached UIsThiago de Arruda2015-01-12
| |
| * ui: Add 'rgb' parameter to ui_attachThiago de Arruda2015-01-12
| | | | | | | | When set to false, nvim will send cterm color numbers with `highlight_set`.
| * ui: Dont resize screen if no UIs are attachedThiago de Arruda2015-01-12
| | | | | | | | | | This prevents a race condition when a UI attaches early in the program and can receive redraw commands for a invalid screen
| * ui: Merge standout and reverse into one attributeThiago de Arruda2015-01-12
| |
| * ui: Fix ui resizing and change some method namesThiago de Arruda2015-01-12
| |
| * ui: Increase cursor row when text being rendered would cross its limitThiago de Arruda2015-01-10
| |
| * ui: Add update_fg/update_bg methodsThiago de Arruda2015-01-10
| | | | | | | | | | It is necessary to notify the UI when the default background/foreground colors change in order to render correctly.