| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
| |
It is necessary to notify the UI when the default background/foreground colors
change in order to render correctly.
|
| |
|
|\
| |
| | |
[WIP] "abstract_ui" fixes and improvements
|
| |
| |
| |
| |
| | |
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_linefeed will scroll the screen when it becomes full. This can happen when
executing external commands.
|
| | |
|
| |
| |
| |
| |
| |
| | |
- Remove suspend method from the UI protocol
- Handle `:suspend` by disconnecting the last channel that sent a request to
nvim.
|
| | |
|
| |
| |
| |
| | |
When set to false, nvim will send cterm color numbers with `highlight_set`.
|
| |
| |
| |
| |
| | |
This prevents a race condition when a UI attaches early in the program and can
receive redraw commands for a invalid screen
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
It is necessary to notify the UI when the default background/foreground colors
change in order to render correctly.
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem : getdigits() currently returns a long, but at most places,
return value is casted (unsafely) into an int. Making casts
safe would introduce a lot of fuss in the form of assertions
checking for limits.
Note : We cannot just change return type to int, because, at some
places, legitimate long values are used. For example, in
diff.c, for line numbers.
Solution : Introduce new functions:
- get_digits() : Gets an intmax_t from a string.
- get_int_digits() : Wrapper for ints.
- get_long_digits() : Wrapper for longs.
And replace getdigits() invocations by the appropiate
wrapper invocations.
|
|
|
|
|
|
|
|
| |
Instead of using classic cterm color numbers and attributes, treat "abstract_ui"
as a GUI: Pass rgb color numbers and gui attributes when the "highlight_set" UI
method is called. The terminal UI will have to translate RGB color information
to an appropriate color number, and the "term"/"cterm" :highlight keys will
eventually be deprecated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is how Nvim behaves when the "abstract_ui" termcap is activated:
- No data is written/read to stdout/stdin by default.
- Instead of sending data to stdout, ui_write will parse the termcap codes
and invoke dispatch functions in the ui.c module.
- The dispatch functions will forward the calls to all attached UI
instances(each UI instance is an implementation of the UI layer and is
registered with ui_attach).
- Like with the "builtin_gui" termcap, "abstract_ui" does not contain any key
sequences. Instead, vim key strings(<cr>, <esc>, etc) are parsed directly by
input_enqueue and the translated strings are pushed to the input buffer.
With this new input model, its not possible to send mouse events yet. Thats
because mouse sequence parsing happens in term.c/check_termcodes which must
return early when "abstract_ui" is activated.
|
|\
| |
| | |
Non-unix-specific os_unix function.
|
| |
| |
| |
| |
| |
| | |
Switch from POSIX's write() to fwrite(stdout,...) and disable buffering
since vim buffers output explicitly and flushes when needed, like when a
key is typed.
|
| |
| |
| |
| |
| | |
These functions were only being used by mbyte.c, so move them and add the
"static" modifier.
|
|/
|
|
| |
This is not being used and should not be part of the core anyway.
|
|
|
|
| |
Also move read_error_exit to os/input.c
|
| |
|
|
|
|
|
| |
These functions only used to call another os_* function, so remove them and
replace all occurences in the project.
|
|
|
|
|
|
|
|
|
| |
Also:
- Remove NO_CONSOLE_INPUT/NO_CONSULE preprocessor conditionals
- Remove ctrl_c_interrupts variable, check for mapped_ctrl_c directly in
process_interrupts()
- Move ui_inchar profiling to input_poll which is where Nvim blocks for input.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several opart_T members like use_reg_one, end_adjusted, empty,
is_VIsual, and block_mode, only ever store TRUE or FALSE, so make this
constraint explicit by changing them to bools, and TRUE to true and
FALSE to false in the context of their uses.
The member, inclusive, has several other uses such as in arithmetic
equations and one inequality, but every single assignment (obtained with
'grep -r "inclusive \\="') sets it to either TRUE or FALSE.
This also implies that the inequality, "oap->end.coladd <
oap->inclusive", can only be true when coladd==0 and inclusive==true, so
test for that instead.
For consistency, change the first argument of findpar (which ends up
being inclusive) to bool.
Include stdbool.h for consistency with issue #918.
This commit shrinks the size of oparg_T from 128 bytes to 112 (-13%) on
my machine.
|
|
|
|
|
| |
All input buffer code was moved to os/input.c, and `inbuf` is now a `RBuffer`
instance(which abstracts static buffer manipulation).
|
|
|
|
|
|
|
| |
Done by manual inspection of the output of this script:
grep -r -l -w "bool\|true\|false" * | grep 'c$\|h$' > has_bool
grep -r -l "stdbool.h" * | grep 'c$\|h$' > has_include
grep -F -x -v -f has_include has_bool
|
| |
|
| |
|
|
|
|
|
| |
move W_ENDCOL to screen.c
remove the rest of the W_* macros
|
|
|
|
| |
Support for :menu command. It can be used in terminal Vim too.
|
|
|
|
| |
Support for VimScript, :let, :if, etc.
|
|
|
|
| |
Multi-byte character handling.
|
| |
|
| |
|
|
|
|
| |
Prepend 'nvim/' in all project-local (non-system) includes.
|
|
Move files from src/ to src/nvim/.
- src/nvim/ becomes the new root dir for nvim executable sources.
- src/libnvim/ is planned to become root dir of the neovim library.
|