Commit Graph

2708 Commits

Author SHA1 Message Date
Eliseo Martínez
2ceb1c74d5 Remove long_u: regexp: Refactor long_u. 2015-01-19 19:47:28 +01:00
Eliseo Martínez
79b5a629eb Remove long_u: ops.c: Refactor long_u. 2015-01-19 19:47:28 +01:00
Eliseo Martínez
b716b047e0 Remove long_u: ex_docmd.c: Refactor long_u. 2015-01-19 19:47:27 +01:00
Eliseo Martínez
c03913c991 Remove long_u: buffer_defs.h: Refactor long_u. 2015-01-19 19:47:27 +01:00
Eliseo Martínez
e1f7821874 Remove long_u: option.c: Refactor long_u. 2015-01-19 19:47:27 +01:00
Eliseo Martínez
426544ca88 Remove long_u: option.c: Enable -Wconversion. 2015-01-19 19:47:26 +01:00
Eliseo Martínez
31dacda874 Remove long_u: (various): Refactor long_u. 2015-01-19 19:41:27 +01:00
Eliseo Martínez
6762f172d7 Remove long_u: ex_cmds_defs.h: Refactor long_u.
CommandDefinition.cmd_argt: long_u --> uint32_t.
2015-01-19 19:41:27 +01:00
Justin M. Keyes
d0debe2432 Merge pull request #1729 from fwalch/vim-7.4.490
vim-patch:7.4.490
2015-01-19 08:52:29 -05:00
Justin M. Keyes
8393b6d10c Merge pull request #1781 from fwalch/missing-vim-patches
vim-patch.sh: Add option to list missing Vim changesets.
2015-01-19 08:43:38 -05:00
Justin M. Keyes
c7f4e55362 Merge pull request #1798 from oni-link/fix.job.wait
job.c: Prevent early return from job_wait().
2015-01-18 13:23:17 -05:00
oni-link
d7d1b11332 Tests for system()/systemlist() when interrupted with CTRL-C. 2015-01-17 16:34:58 +01:00
Justin M. Keyes
bff48b23d7 Merge pull request #1833 from aktau/formatc-fix-gcc-on-osx
test: Correct lfs.attributes() call, and allow unit tests to run with gcc on OSX
2015-01-16 16:35:33 -05:00
Nicolas Hillegeer
522a15f1c0 test: fix formatc.lua oddity on OSX/gcc
The primitive C canonicalizer we use to strip out duplicate header
declarations and keep luajit's ffi happy, didn't work properly in this case.

What happened is this (in /usr/include/ctype.h):

__DARWIN_CTYPE_TOP_inline int
isspecial(int _c)
{
        return (__istype(_c, _CTYPE_T));
}

Gets preprocessed to something like:

__inline int
isspecial(int _c)
{
        return (__istype(_c, _CTYPE_T));
}

On OSX/gcc. The formatter wasn't recognizing this entire function as
something to put on a single line because it naively just checks for
"static" or "inline" for that, but not "__inline".

This error doesn't occur on OSX/clang. Without looking further into it, I
guess that __DARWIN_CTYPE_TOP_inline gets defined to inline on clang, but
__inline on gcc, for some reason.

This helps issue #1572 along.
2015-01-16 21:45:00 +01:00
Nicolas Hillegeer
dd25b2e5ae test/os/fs: fix call to lfs.attributes
The second argument to lfs.attributes() serves only to select a specific
part of the normally returned table. It's not a file open flag (e.g.: as for
fopen() in C). Also made the (n)eq checks a bit more idiomatic.

Fixes #1831
2015-01-16 21:44:25 +01:00
Justin M. Keyes
401d738597 Merge pull request #1803 from elmart/small-fixes
Small fixes.
2015-01-16 09:27:09 -05:00
Eliseo Martínez
634d5d86a7 coverity/100248: Operands don't affect result: HI.
Problem    : Operands don't affect results (CONSTANT_EXPRESSION_RESULT).
Diagnostic : Harmless issue.
Rationale  : n >= LONG_MIN, n being intmax_t, is always true for
             architectures where sizeof(intmax_t) == sizeof(long).
Resolution : Add sizes check.
2015-01-16 09:26:01 +01:00
Justin M. Keyes
5c6348e999 Merge pull request #1816 from Pyrohh/macro_cleanup
Macro cleanup
2015-01-15 09:59:45 -05:00
Thiago de Arruda
5f24549ab1 Merge PR #1810 'abstract_ui fixes and improvements(continuation)' 2015-01-15 09:19:27 -03:00
Thiago de Arruda
14ebe608e2 deps: Update libtickit URL 2015-01-15 09:01:44 -03:00
Thiago de Arruda
dc18fa256f test: Add more functional test to cover new code
- emulate gui_running and terminal colors
- scrolling/clearing regions
- mouse wheel scrolling
- setting icon/title
- :stop/:suspend
- screen resize
2015-01-15 09:01:25 -03:00
Thiago de Arruda
c51c0950d3 screen: Fix screen_resize to consider minimum screen size 2015-01-15 09:01:16 -03:00
Thiago de Arruda
361c2290b6 input: Fix check for mouse coordinates
Must check for EOF which will result in row/col being uninitialized.
2015-01-15 09:00:38 -03:00
Michael Reed
d2e7cce560 Macro cleanup: Miscellaneous
These were found with -Wunused-macros. There are many more macros which
triggered that warning, but they were primarily part of larger sets of
macros so leave them alone.
2015-01-14 22:23:16 -05:00
Michael Reed
cd8e91b87e Macro cleanup: HAS_SWAP_EXISTS_ACTION
Neovim always ships with all features[0], so this serves no purpose.
Besides, this always evaluated to true.

[0]: https://github.com/neovim/neovim/wiki/Differences-from-vim
2015-01-14 15:08:19 -05:00
Michael Reed
d86ebc7afb Macro cleanup: PROTO
Regarding dict_lookup() in eval.c: both definitions are the same, the
only difference being the spacing between the indirection operator and
the indentation level.
2015-01-14 15:07:16 -05:00
Thiago de Arruda
7b537ffda9 input: Read row/col position when processing mouse wheel 2015-01-14 16:59:54 -03:00
Thiago de Arruda
8596776bf6 ui: Implement set_{title,icon} 2015-01-14 08:31:20 -03:00
Eliseo Martínez
12f606a2a8 Fix bad assert.
Problem  : Assert can fail for legal values. Modulo-arithmetic of
           unsigned types can make so that n * 100 > n, but n has
           overflowed.
Solution : Use alternative form of expression.
2015-01-14 10:19:21 +01:00
Florian Walch
0cbc48ea89 vim-patch.sh: Add option to list missing Vim changesets. 2015-01-14 09:51:19 +01:00
Thiago de Arruda
ea771ac559 test: Add Screen.debug for inspecting screens of hanging tests 2015-01-13 21:21:20 -03:00
Thiago de Arruda
8bff79d3fd term: Fix shell_resized for abstract_ui 2015-01-13 21:21:20 -03:00
Thiago de Arruda
6f7db326cb screen: Fix highlight reset for abstract_ui 2015-01-13 21:21:20 -03:00
Thiago de Arruda
3e9c55b51b main: Fix color schemes for abstract_ui
- 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.
2015-01-13 21:21:20 -03:00
Thiago de Arruda
8f3e61a043 syntax: Refresh UI when the color scheme changes 2015-01-13 21:21:20 -03:00
Thiago de Arruda
784bda0704 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-13 21:21:20 -03:00
Thiago de Arruda
f3666e55a4 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-13 21:21:20 -03:00
Thiago de Arruda
dac1cee907 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-13 21:21:20 -03:00
Thiago de Arruda
b4f516a36a ui: Fix out_flush/ui_write behavior to always flush for abstract_ui 2015-01-13 21:21:19 -03:00
Thiago de Arruda
df1f62194e 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-13 21:21:19 -03:00
Thiago de Arruda
2db4049274 ui: Fix :suspend command for remote UIs
Forward the command to the remote UI and flush immediately. The
semantics/handling is UI-specific.
2015-01-13 21:21:06 -03:00
Thiago de Arruda
a282d06a67 ui: Don't parse abstract_ui codes if there are no attached UIs 2015-01-13 11:54:52 -03:00
Thiago de Arruda
5d2f923fcf channel: Free channels created from libuv streams 2015-01-13 11:54:52 -03:00
Thiago de Arruda
29bc6dfabd ui: Add 'rgb' parameter to ui_attach
When set to false, nvim will send cterm color numbers with `highlight_set`.
2015-01-13 11:54:52 -03:00
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