Commit Graph

2953 Commits

Author SHA1 Message Date
oni-link
fe4920f138 Remove unnecessary assert() in os_dirname().
Compiler warns about buf always being nonnull.

buf is per function attribute always nonnull, so buf can be removed from
the assert(). But a buffer length of zero is also no problem, because it
makes uv_cwd() return a failure without writing into buf. So the
remaining length check can also be removed.
2015-03-08 13:01:16 +01:00
Chase Geigle
da457a176b tui: fall back to underline for undercurl. #2099
closes #2098
2015-03-07 21:10:24 -05:00
Floris van Liere
57811dec95 set_init_1: mb_init() on fallback encoding (utf8) #2106
Explanation:
  Running `:set encoding=utf-8` _after_ startup correctly initializes
  multibyte; but mb_init() was _not_ called during startup if locale
  detection (enc_locale()) failed. This wasn't a problem in Vim because
  the Vim default encoding (latin1) does not require mb_init(). But Nvim
  defaults to utf8, so mb_init() is required.

closes #1271
closes #1672
2015-03-07 17:53:04 -05:00
John Szakmeister
85f5115723 Merge pull request #2110 from xu-cheng/sha256
Switch to SHA256 for third-party bundles downloading
2015-03-06 04:30:30 -05:00
Xu Cheng
d11e5b5d0d Switch to SHA256 for third-party bundles downloading
Closes #2107
2015-03-06 15:31:08 +08:00
Justin M. Keyes
a06186de41 Merge #2011 'Macro cleanup' 2015-03-05 19:03:37 -05:00
Michael Reed
117bf11e19 Macro cleanup: USE_UNIXFILENAME 2015-03-05 19:03:36 -05:00
Michael Reed
4d7b31fd61 Macro cleanup: USE_ON_FLY_SCROLL 2015-03-05 19:03:36 -05:00
Michael Reed
49e7164165 Macro cleanup: USER_HIGHLIGHT 2015-03-05 19:03:36 -05:00
Michael Reed
cf663588d9 Macro cleanup: USE_EXE_NAME 2015-03-05 19:03:35 -05:00
Michael Reed
0925870d0c Macro cleanup: ONE_CLIPBOARD 2015-03-05 19:03:35 -05:00
Michael Reed
70a7517d17 Macro cleanup: UNICODE16
Fix clint warnings as well.
2015-03-05 19:03:35 -05:00
Michael Reed
c5c3eb99d3 Macro cleanup: SPACE_IN_FILENAME 2015-03-05 19:03:35 -05:00
Michael Reed
357583ff8c Macro cleanup: HAVE_SANDBOX 2015-03-05 19:03:34 -05:00
oni-link
0dd1ad0760 vim-patch:7.4.578
Problem:    Using getcurpos() after "$" in an empty line returns a negative
            number.
Solution:   Don't add one when this would overflow. (Hirohito Higashi)

https://code.google.com/p/vim/source/detail?r=v7-4-578
2015-03-04 18:25:52 +01:00
Carlos Castillo
a4c3ac2799 remote_ui: Fix error messages #2045
Make the error messages more precise and uniform.
2015-03-04 00:21:55 -05:00
Björn Linse
5be040ffe4 jobsend: Don't append extra newline after last item
This allows sending binary data that is not newline terminated
2015-03-03 20:18:24 +01:00
John Szakmeister
6b7ece6cc8 Merge pull request #2083 from fwalch/fix-deps-32
deps: Fix building 32-bit Lua rocks.
2015-03-02 04:58:44 -05:00
Florian Walch
a4b96f2f11 deps: Fix building 32-bit Lua rocks.
* Force building Lua rocks instead of trying to install a binary.
 * Set the CC and LD environment variables to pass
   CMAKE_C_COMPILER_ARG1 (contains `-m32` for 32-bit builds)
   to `luarocks build`.
2015-03-02 09:54:24 +01:00
John Szakmeister
ea35062589 Merge pull request #2075 from jszakmeister/dont-hardcode-tty-test-path
tests: don't hardcode the path to tty-test
2015-03-01 15:24:00 -05:00
John Szakmeister
32951edc9d Merge pull request #2079 from jszakmeister/test-fixes-for-busted
tests: require luassert in the helpers
2015-03-01 15:07:05 -05:00
John Szakmeister
235909044a tests: require luassert in the helpers
This is necessary for newer versions of Busted, otherwise assert will be
nil and the tests will die.

Note: this does not mean the tests now work with the latest Busted.
There are still several issues preventing that from happening.
2015-03-01 09:00:27 -05:00
John Szakmeister
c1e8d12aa3 tests: don't hardcode the path to tty-test
This fixes the build for those who drive the build directly using
CMake.
2015-02-28 10:46:56 -05:00
Thiago de Arruda
4bebdd1cd9 deps: Small fix for PR #2072
A newer version of luafilesystem than the one reported by busted rockspec is
required for the unit tests.

Also update libvterm sha1/url
2015-02-28 11:12:51 -03:00
Thiago de Arruda
c6482eb598 Merge PR #2072 'Add custom target for pinning busted dependencies' 2015-02-28 10:43:52 -03:00
Thiago de Arruda
81a346553c deps: Add libvterm to the project dependencies
libvterm is a terminal emulation library with abstract display. It will be used
to implement builtin terminal emulation into Nvim.
2015-02-28 10:41:53 -03:00
Thiago de Arruda
585e5d32a3 deps: Add custom target for pinning busted dependencies
busted depends on a number of libraries that sometimes introduce crashing bugs.
The new custom target makes sure only stable versions of those dependencies are
installed.
2015-02-28 10:30:29 -03:00
Numkil
bbc9eff9ae test: mark job/pty test as pending #2058
- closes #2057
- see https://github.com/neovim/neovim/issues/2057 for discussion
2015-02-26 19:23:37 -05:00
Mike Zeller
f28941b96d illumos requires the use of limits.h for things like INT_MAX #2049 2015-02-26 11:42:05 -05:00
Eliseo Martínez
36092f3a0c Fix warnings: message.c: copy_hotkeys_and_msg: Garbage value: FP. #2062
Problem    : Branch condition evaluates to a garbage value @ 2868.
Diagnostic : False positive.
Rationale  : Array has_hotkey, declared at 2812, is initialized by
             console_dialog_alloc (only the needed number of elements).
             That same number of elements is used by
             copy_hotkeys_and_msg.
             Suggested path error is impossible, because it involves a
             different number of elements in those functions.
Resolution : Above condition is cumbersome to prove through assertions.
             Thus, we prefer to just initialize the array to all-false
             at declaration point before calling console_dialog_alloc.
2015-02-26 09:04:36 +01:00
John Szakmeister
61c98e7e35 Merge pull request #2053 from jszakmeister/fix-libuv-libraries
Fix collection of libuv dependent libraries.
2015-02-25 05:05:18 -05:00
John Szakmeister
e077f4ee99 build: filter off libuv from PC_LIBUV_LIBRARIES
Otherwise, the -rdynamic that is being passed on the command line will
require a dynamic link, even though we often want a static one.
2015-02-24 14:01:25 -05:00
John Szakmeister
9bc1e4335c build: make sure our deps area is picked up for pkg-config files 2015-02-24 14:01:20 -05:00
Thiago de Arruda
56f371cb82 Merge PR #2037 'Job control fixes and pseudo terminal support' 2015-02-23 22:25:36 -03:00
Thiago de Arruda
d7e560e5b3 job: Allow spawning jobs connected to pseudo terminals 2015-02-23 21:43:33 -03:00
Thiago de Arruda
1ec7db70ec job: Refactor process spawning and startup arguments
- process spawning was decoupled from the rest of the job control logic.  The
  goal is reusing it for spawning processes connected to pseudo terminal file
  descriptors.
- job_start now receives a JobOptions structure containing all the startup
  options.
2015-02-23 21:43:33 -03:00
Thiago de Arruda
0b8d3cb507 job: Send SIGTERM before calling job_stop in job_teardown
Send sigterm immediately since it can be caught by processes. If they don't
respond and are still alive after a while, SIGKILL will be sent.
2015-02-23 21:43:33 -03:00
Thiago de Arruda
d28011ee1c eval: Fix buffering of data in job autocommands
Job autocommands will no longer buffer data chunks that don't end in newlines
characters.
2015-02-23 21:43:33 -03:00
Florian Walch
0df6b9168e Simpler handling for "always-on"/"always-off" options. #2002
'compatible' and 'edcompatible' are forced to be off.
'ttyfast' is forced to be on.
2015-02-22 14:55:58 -05:00
Thiago de Arruda
3e29231684 Merge PR #2039 'Update unibilium for OSX' 2015-02-21 22:43:57 -03:00
Thiago de Arruda
97f8251472 tui: Also use xterm-256color when TERM=screen and COLORTERM != NULL
When COLORTERM != null force xterm-256color capabilities when TERM equals xterm
or screen.
2015-02-21 22:28:38 -03:00
Thiago de Arruda
0ed3d66bef deps: Update unibilium version to add OSX support 2015-02-21 22:17:47 -03:00
Eliseo Martínez
e9c5f96964 Merge #2027: Fix clang analysis warnings. (7) 2015-02-21 16:51:53 +01:00
Eliseo Martínez
c784ffb308 Fix warnings: window.c: close_last_window_tabpage(): Use after free: RI.
Problem    : Use after free @ 1795.
Diagnostic : Real issue.
Rationale  : prev_curtab can in fact be freed as a result of call
             `win_close_othertab(win, free_buf, prev_curtab);`, but it's
             later used at
             `sprintf(..., tabpage_index(prev_curtab));`.
             This was introduced at
             3ffc5d81c3.
Resolution : Move prev_idx calculation before the call freeing
             prev_curtab.
2015-02-21 10:35:48 +01:00
Eliseo Martínez
56e339c594 Fix warnings: screen.c: screen_puts_len(): Various (4): FP/MI.
Problems   : Assigned value is garbage or undefined @ 5363.
             Result of operation is garbage or undefined @ 5356.
             Result of operation is garbage or undefined @ 5320.
             Result of operation is garbage or undefined @ 5192.
Diagnostic : False positives / Multithreading issues.
Rationale  : Suggested error paths contain incoherent values for
             has_mbyte, enc_utf8, and enc_dbcs, which should always hold
             the relationship has_mbyte = enc_utf8 || enc_dbcs, with
             enc_utf8 and enc_dbcs being mutually exclusive.
             Asserting on the globals, though, fails, because checker
             believes they could be modified by other threads in
             between.
Resolution : Make local copy of globals and assert relationship on them.
2015-02-21 10:35:48 +01:00
Thiago de Arruda
c48f835749 Merge PR #1997 'Remove term modules' 2015-02-21 06:33:18 -03:00
Thiago de Arruda
6293b5513c tui: Use unibi_format instead of unibi_run
The current will segfault for large chunks of output because the output buffer
will be overrun.

Using unibi_format is simple because we can simply flush the buffer when its
full.
2015-02-21 05:09:02 -03:00
Thiago de Arruda
eb8f6bec86 tui: Remove option cache 2015-02-21 05:09:02 -03:00
Thiago de Arruda
c58907dac1 tui: Set setaf/setab capabilities for TERM=xterm
Many common terminals that set TERM=xterm and $COLORTERM support 256 colors. If
this is detected, use force the hardcoded xterm's setaf/setab capabilities.
2015-02-21 05:09:02 -03:00
Thiago de Arruda
3baba1e7bc refactor: Remove term modules and termcap options
- 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
2015-02-21 05:08:21 -03:00