Commit Graph

2864 Commits

Author SHA1 Message Date
Thiago de Arruda
631099d02a syntax: Take rgb fg/bg when allocating cterm attr number 2015-01-13 11:54:52 -03:00
Thiago de Arruda
46b4764f7a ui: Merge standout and reverse into one attribute 2015-01-13 11:54:52 -03:00
Thiago de Arruda
3e83e44792 input: Ignore invalid "<" key sequences
Ignoring invalid key sequences simplifies input handling in UIs. The only
downside is having to use "<lt>" everytime a "<" is needed on functional tests.
2015-01-13 11:54:51 -03:00
Thiago de Arruda
17b211d288 test: Remove unnecessary command from highlight_spec 2015-01-13 11:54:51 -03:00
Thiago de Arruda
926503c84e ui: Fix ui resizing and change some method names 2015-01-13 11:54:28 -03:00
Thiago de Arruda
8c12292a61 remote_ui: Move handler registration to remote_ui.c
Also disable deferral of attach_ui
2015-01-13 11:53:27 -03:00
Thiago de Arruda
f0a944d3cf ui: Add mising T_CSV code to abstract_ui termcap
This code is required for screen.c to set a vertical scroll region, which is a
great optimization when scrolling vertically split windows.
2015-01-13 11:53:27 -03:00
Thiago de Arruda
6c447848bb ui: Increase cursor row when text being rendered would cross its limit 2015-01-13 11:53:27 -03:00
Thiago de Arruda
fc8f768690 ui: Add update_fg/update_bg methods
It is necessary to notify the UI when the default background/foreground colors
change in order to render correctly.
2015-01-13 11:53:27 -03:00
Thiago de Arruda
1ccbd94bee test: Fix clear/eol_clear in screen.lua
These functions need to operate on the current the scroll region.
2015-01-13 11:53:27 -03:00
Justin M. Keyes
9b4f6fbd33 Merge pull request #1782 from fwalch/small-patches
vim-patch: Multiple small patches
2015-01-13 09:38:19 -05:00
Justin M. Keyes
a99d33ad9a Merge pull request #1801 from Pyrohh/qnx_cleanup
Remove QNX/pterm remnants
2015-01-13 00:46:17 -05:00
Justin M. Keyes
9c090e9329 Merge pull request #1792 from fwalch/clint_remove-rand_r
Linting: Recommend os_* instead of POSIX functions.
2015-01-12 23:50:08 -05:00
Justin M. Keyes
9d0be9604e Merge pull request #1804 from neovim/revert-1657-abstract-ui-fixes
Revert "[WIP] "abstract_ui" fixes and improvements"
2015-01-12 10:15:13 -05:00
Justin M. Keyes
d7e18b5c95 Revert "[WIP] "abstract_ui" fixes and improvements" 2015-01-12 10:14:52 -05:00
Justin M. Keyes
4c55c34efa Merge pull request #1657 from tarruda/abstract-ui-fixes
[WIP] "abstract_ui" fixes and improvements
2015-01-12 10:13:51 -05:00
Thiago de Arruda
62c1daffe0 syntax: Refresh UI when the color scheme changes 2015-01-12 10:28:32 -03:00
Thiago de Arruda
a16cd73ead ui: Fix redraw bug caused by race conditions with remote clients
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.
2015-01-12 09:47:42 -03:00
Thiago de Arruda
418a49f7f1 shell: When executing command, use screen functions to display output
By calling ui_write directly, the internal screen isn't updated and invalid
bytes aren't handled, which breaks the abstract UI model.
2015-01-12 09:47:41 -03:00
Thiago de Arruda
7703fd328c ui: Use ui_linefeed to handle line breaks correctly
ui_linefeed will scroll the screen when it becomes full. This can happen when
executing external commands.
2015-01-12 09:47:41 -03:00
Thiago de Arruda
e1da130ca9 ui: Fix out_flush/ui_write behavior to always flush for abstract_ui 2015-01-12 09:47:41 -03:00
Thiago de Arruda
e3b2907f2f channel: Make pending_requests a field of the Channel type
This is required to send redraw notifications while a msgpack-rpc call is being
performed by another channel.
2015-01-12 09:47:41 -03:00
Thiago de Arruda
d992213678 ui: Reimplement :suspend command for remote UIs.
- Remove suspend method from the UI protocol
- Handle `:suspend` by disconnecting the last channel that sent a request to
  nvim.
2015-01-12 09:47:41 -03:00
Thiago de Arruda
abc147a977 ui: Don't parse abstract_ui codes if there are no attached UIs 2015-01-12 09:47:41 -03:00
Thiago de Arruda
cba9162215 channel: Free channels created from libuv streams 2015-01-12 09:47:41 -03:00
Thiago de Arruda
74c247f75b ui: Add 'rgb' parameter to ui_attach
When set to false, nvim will send cterm color numbers with `highlight_set`.
2015-01-12 09:47:41 -03:00
Thiago de Arruda
a8fe32040b ui: Dont resize screen if no UIs are attached
This prevents a race condition when a UI attaches early in the program and can
receive redraw commands for a invalid screen
2015-01-12 09:47:41 -03:00
Thiago de Arruda
869c734890 screen: Fix bug that causes separator to always be redraw for utf8 2015-01-12 09:47:41 -03:00
Thiago de Arruda
a4525bc523 screen: Remove abstract_ui test in reset_cterm_colors 2015-01-12 09:47:40 -03:00
Thiago de Arruda
4a28785c6e runtime: Fix plugin/matchparen.vim for abstract_ui 2015-01-12 09:47:40 -03:00
Thiago de Arruda
c1252a5615 syntax: Take rgb fg/bg when allocating cterm attr number 2015-01-12 09:47:40 -03:00
Thiago de Arruda
0887c5446e ui: Merge standout and reverse into one attribute 2015-01-12 09:47:40 -03:00
Thiago de Arruda
0219c87534 input: Ignore invalid "<" key sequences
Ignoring invalid key sequences simplifies input handling in UIs. The only
downside is having to use "<lt>" everytime a "<" is needed on functional tests.
2015-01-12 09:47:40 -03:00
Thiago de Arruda
d50d79831e test: Remove unnecessary command from highlight_spec 2015-01-12 09:47:40 -03:00
Thiago de Arruda
213c3c3e53 ui: Fix ui resizing and change some method names 2015-01-12 09:47:34 -03:00
Michael Reed
16d0976150 Remove QNX/pterm remnants
The function qnx_init() (wrapped in an ifdef in main.c) doesn't even
exist.
2015-01-11 21:00:06 -05:00
oni-link
5c22f07c4f job.c: Prevent early return from job_wait().
A blocking call job_wait(job, -1) can only return after job is finished
and all handles of job are closed. But hitting CTRL-C makes job_wait()
return early while handles can still be open. This can lead to problems
with the job/handle callbacks if the caller (of job_wait()) already
freed the memory that is used in the job callbacks.

To fix this, only return after all handles of the job are closed.
2015-01-11 23:28:02 +01:00
Justin M. Keyes
c53852a244 Merge pull request #1710 from Pyrohh/improve-docs-job-control
Misc. improvements to job control & msgpack rpc docs [ci skip]
2015-01-11 17:12:05 -05:00
Michael Reed
e0f66137d1 docs: Misc. improvements to job_control/msgpack
- Rewrote a few sentences for clarity/brevity
- Various spelling/grammar fixes
- Mention exact time before SIGKILL (mentioned in /src/nvim/os/job.c)
- Reflowed all changed paragraphs accordingly
- Standardize indentation level
- Remove trailing whitespace

- Job control example:
  - Don't buffer output (echo -n); just print a new line for every
    update.
  - Use single quotes around jobsend() arguments to allow for proper
    interpretation of newline characters.
  - Sleep 1 second between updates instead of 2; 10 seconds is plenty of
    time for such a simple example.
2015-01-11 16:50:24 -05:00
Michael Reed
215603ebd7 docs: More consistent descriptions of rpc*() funcs
- Remove note about how {channel} is rpcstop's only argument; just
  mention {channel} at the beginning like the other descriptions.
- Small grammar fixes
2015-01-11 16:50:23 -05:00
Justin M. Keyes
7f30439d0f Merge pull request #1794 from elmart/remove-long_u-cleanup
Some suggested cleanup after #1788.
2015-01-11 15:34:38 -05:00
Eliseo Martínez
7f7262e933 Cleanup: Rename getdigits() family functions. 2015-01-11 21:04:08 +01:00
Florian Walch
470b87e377 Linting: Recommend os_* instead of POSIX functions. 2015-01-11 17:29:17 +01:00
Eliseo Martínez
bb737b6f0e Cleanup: Refactor variables: long --> int.
At 31c8440fee, some variables were changed
from int to long, to avoid -Wconversion errors. Long type was the
appropiate one because getdigits() was returning a long.
Now that we have get_int_digits() and get_long_digits(), we can revert
mentioned variables to int, and use get_int_digits() without having
-Wconversion warnings.
2015-01-11 17:18:39 +01:00
Eliseo Martínez
04c0658024 Cleanup: Refactor getdigits().
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.
2015-01-11 17:18:39 +01:00
Eliseo Martínez
28e75d4c45 Cleanup: Refactor option_table_T.number: long --> int. 2015-01-11 15:10:38 +01:00
Eliseo Martínez
d600c8fbb1 Cleanup: Refactor prt_{fg,bg,new_bg}col: int --> uint32_t. 2015-01-11 15:10:29 +01:00
Eliseo Martínez
565c43668a Cleanup: Remove local var bg_color@prt_get_attr(). 2015-01-11 15:10:18 +01:00
Eliseo Martínez
d0bd057ffe Cleanup: Fix bad assert.
Assert will fail on first loop iteration (in that case,
prtpos.bytes_printed is 0).
2015-01-11 15:10:13 +01:00
Thiago de Arruda
9b30abcecb remote_ui: Move handler registration to remote_ui.c
Also don't defer attach_ui handling
2015-01-10 21:41:32 -03:00