Commit Graph

19394 Commits

Author SHA1 Message Date
Jonas Dourado
293a7dc134 Remove platform dependent HAVE_OPENDIR #2010 2015-03-17 23:52:50 -04:00
Thiago de Arruda
5709181243 main: Start stdin before sourcing startup scripts
This is required to be compatible with plugins that ask user questions at
startup(eg: vim-addon-local-vimrc)
2015-03-17 14:49:09 -03:00
Anton Ovchinnikov
4fd8c3cbbb Reuse f_browse function from f_browsedir
The bodies of f_browse() and f_browsedir() were identical.
2015-03-16 11:01:09 -04:00
Anton Ovchinnikov
b81ec82533 Remove unnecessary 'free'
from_noamp is always NULL in this branch
2015-03-16 11:01:09 -04:00
Anton Ovchinnikov
76970fe2c1 Clarify an out-of-memory cleanup, remove a function-wide loop counter 2015-03-16 11:01:09 -04:00
Anton Ovchinnikov
53452663cc Remove redundant parentheses 2015-03-16 11:01:08 -04:00
Anton Ovchinnikov
a62a2b6250 Merge consecutive identical 'if' statements 2015-03-16 11:01:08 -04:00
Anton Ovchinnikov
9927e99948 Remove always-true expressions 2015-03-16 11:01:07 -04:00
Gustaf Lindstedt
6511c24af8 legacy tests: migrate test19 2015-03-16 10:54:49 -04:00
Gustaf Lindstedt
311f09e20f legacy tests: migrate test89 2015-03-16 10:54:36 -04:00
Thiago de Arruda
1d80c0e3a0 ui: Only call ui_flush when the busy state changes
Also add back the `ui_flush` call to `get_keystroke`. Its necessary to display
prompt messages correctly.
2015-03-16 08:35:43 -03:00
Thiago de Arruda
c546875daf ui: Replace cursor_{on,off} by busy_{stop,start}
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).
2015-03-15 10:30:59 -03:00
John Szakmeister
24f2504036 Fix unused variable in wstream.c for a release build. 2015-03-14 10:30:30 -04:00
oni-link
0d8a10f6c5 vim-patch: mark 7.4.660 as included
refs #2138

vim-patch: https://code.google.com/p/vim/source/detail?r=476a12a96bb1e5ccc71b1c1010d529deca271617
2015-03-13 17:27:44 -04:00
oni-link
a916696a13 syntax.c: Prevent use after free for variable g:colors_name.
ASan spotted a problem when using 'set background={light,dark}' with
color scheme solarized.
While loading the colors for color scheme 'g:colors_name', the pointer
on the value for this variable can become invalid, because of an 'unlet
colors_name' (part of an :highlight clear, syntax.c:6173).

To prevent the use of the freed value, decouple the value from
'g:colors_name' before calling load_colors() with it.
2015-03-13 17:26:54 -04:00
Lech Lorens
bdbbdb5888 vim-patch:7.4.637 #2126
Problem:    Incorrectly read the number of buffer for which an autocommand
            should be registered.
Solution:   Reverse check for "<buffer=abuf>". (Lech Lorens)

https://code.google.com/p/vim/source/detail?r=v7-4-637
2015-03-13 17:25:04 -04:00
John Szakmeister
627d8e4dfe Avoid an unused variable warning in the release build. 2015-03-13 15:34:37 -04:00
John Szakmeister
c015eabe13 Merge pull request #2118 from rev112/fix_redundant_cast
Remove redundant casts
2015-03-13 07:09:08 -04:00
Michael Reed
481ebc0bb1 Interface cleanup: Symlink handling & docs
This removes the ability to start nvim via the following aliases in
favor of just using their command line arguments:

ex        vim -e
exim      vim -E
view      vim -R
gvim      vim -g
gex       vim -eg
gview     vim -Rg
rvim      vim -Z
rview     vim -RZ
rgvim     vim -gZ
rgview    vim -RgZ

This also removes Vi mode (-v) for consistency. From ':help -v':

    -v  Start Ex in Vi mode.  Only makes a difference when the
    executable is called "ex" or "gvim".  For gvim the GUI is not
    started if possible.
2015-03-12 20:04:26 -04:00
Michael Reed
5fcd12f8b5 vim-patch: mark 7.4.615 as included #2109
refs #1761

Original vim patch: http://ftp.vim.org/vim/patches/7.4/7.4.615
2015-03-12 19:24:21 -04:00
John Szakmeister
74531e50dc Merge pull request #2114 from oni-link/remove.assert
Fixes for two compiler warnings
2015-03-12 07:24:15 -04:00
Michael Reed
032c20078a os_unix_defs && os/unix_defs: Consistently use '~' over '$HOME' #2009
these path names are ridiculous...

Based on #889, but also remove some unused #defines
2015-03-11 18:32:58 -04:00
Rainer Borene
c9fefe2a74 legacy tests: migrate test84 2015-03-11 00:22:23 -04:00
Rainer Borene
126b169f99 legacy tests: migrate test91 2015-03-11 00:22:23 -04:00
Rainer Borene
1e4a5f878f legacy tests: migrate test90 2015-03-11 00:22:23 -04:00
Rainer Borene
a1aacb2a32 legacy tests: migrate test95 2015-03-11 00:22:23 -04:00
Rainer Borene
2cfecf5420 legacy tests: migrate test15 2015-03-11 00:22:23 -04:00
Rainer Borene
0099f6148c legacy tests: migrate test_listlbr_utf8 2015-03-11 00:22:23 -04:00
Rainer Borene
0f97f52ded legacy tests: migrate test98 2015-03-11 00:22:22 -04:00
Rainer Borene
9c40721ea4 legacy tests: migrate test103 2015-03-11 00:22:22 -04:00
Rainer Borene
05fcce3896 legacy tests: migrate test_qf_title 2015-03-11 00:00:22 -04:00
Rainer Borene
b18cd63260 legacy tests: migrate test100 2015-03-11 00:00:22 -04:00
Gustaf Lindstedt
2d65ccf06c test: migrate legacy test 77 #2046
Migrate legacy test 77 which tests mf_hash_grow() to lua/busted.
2015-03-08 23:27:54 -04:00
Björn Linse
e0f8eea9f1 version: don't use NVIM_VERSION_* directly outside version.c
This avoids recompiles after commiting.
2015-03-08 21:54:57 -04:00
Björn Linse
4f92178a75 config: split out versiondef.h from config.h
This avoids recompiling every c file after comitting.
2015-03-08 21:54:57 -04:00
Anton Ovchinnikov
9925b3a047 Remove redundant casts 2015-03-09 00:40:50 +01:00
oni-link
681125eb94 Compiler warns about uninitialized object in vim_eval().
In case of an evaluation error the returned Object is not initialized,
so initialize it with OBJECT_INIT.
2015-03-08 13:15:00 +01:00
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
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