Commit Graph

2836 Commits

Author SHA1 Message Date
Michael Reed
af5483089e src: README.txt -> README.md
The former no longer exists in this repo; see the top of
src/nvim/README.md.
2015-11-23 21:38:08 -05:00
Felipe Morales
80cf03602e Merge pull request #3581 from ZyX-I/fix-shada
Store last search direction when writing ShaDa files
2015-11-23 23:03:29 +01:00
ZyX
b98cea909f shada: Also store last search direction
Note: it looks like viminfo files do not store search direction intentionally.
After reading viminfo file search direction was considered to be “forward”.

Note 2: all files created on earlier Neovim version will automatically receive
“forward” direction.

Fixes #3580
2015-11-23 17:08:01 +03:00
Joe Hermaszewski
442cd0672b Enable focus events in cmdline and terminal modes
This change adds switch cases for K_FOCUSGAINED and K_FOCUSLOST to the
input handling functions in ex_getln.c and terminal.c. The handling is
identical to what's found in edit.c (just calling apply_autocmds).

If one enters cmdline-mode by feeding `:` and sends a focuslost event (by
leaving the window for example) the text `<FocusLost>` will be inserted
into the command line. There is similar behaviour in terminal mode. This
patch corrects this behavior to fire the apropriate autocmd instead.

Fixes #3714
2015-11-23 13:18:27 +01:00
Shougo Matsushita
1fbb56795d Update version.c to latest Vim
NA patches list:

652: xxd changes  xxd is not included in neovim
744: if_ruby and if_perl legacy tests
750: if_perl build problem
751: compile options
756: if_perl support
757: term.c changes
759: if_lua support
761: term.c changes
762: term.c changes
763: if_lua support
766: term.c changes
770: term.c changes
772: if_mzsch support
802: duplicated test
809: revert of 802
829: GUI
837: Windows with if_sniff
840: GUI
846: CONTRIBUTING.md
850: CONTRIBUTING.md
851: Win32 console
852: Win32 console
855: GTK GUI
861: GTK GUI
862: GTK GUI
867: Windows Fix
869: Windows GUI
872: CI service
874: Windows GUI
875: README.md
876: Windows GUI
880: CI service
884: CI service
886: Windows GUI
890: if_python3
894: vimrun.exe
899: README.md
900: README.md
902: Win32 console
906: Windows problem
907: Dynamic loading
908: Windows build error
910: if_python
911: terminal
913: hangul input GUI only
917: hangulin.c changes
918: if_python
919: if_lua, if_python, if_python3
920: ruby stuff
921: Windows

Reviewed-by: Michael Reed <Pyrohh@users.noreply.github.com>
2015-11-20 13:44:07 -05:00
Joe Hermaszewski
33eb33bb62 Implement handling of terminal focus events
Two new keys have been added to key_name_entry in keymap.c:
`FocusGained` and `FocusLost`.

Two cases have been added to the key handing switch in edit.c each
applying their respective autocmds.

In normal.c two functions have been added alongside nv_cursorhold doing
a similar job of applying the autocmd for the appropriate key.

tui/input.c has a new function `handle_focus_event` which eats either of
the control sequences for focus gained or lost. This function is checked
before handle_bracketed_paste and handle_forced_escape.

tui.c registers neovim as able to receive these control sequences in
terminfo_start and undoes that in terminfo_stop.

Closes #2302
2015-11-17 22:36:28 +00:00
Michael Reed
3f7a465535 ex_cmds.lua: Use ex_ni directly
As can be seen in [1], the ifdefs are leftovers from Vim, where tons of
features are optional.  This is not the case in Nvim, so the macros are
of little use.  Besides, ex_ni is already used in a bunch of places,
just not consistently.

The ex_language macro was left untouched as the inclusion of
``:language'' actually is determined at compile time, unlike the other
commands which _always_ print "this command is not available in this
version".

[1]: https://github.com/vim/vim/blob/master/src/ex_docmd.c#L18-L497

Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
2015-11-15 18:34:18 -05:00
Justin M. Keyes
91c5135f71 Merge pull request #3339 from war1025/dev/clean_build_stl_str_hl
Clean up buffer.c build_stl_str_hl
2015-11-15 16:48:13 -05:00
Michael Reed
9b8ac827b4 Merge pull request #3672 from Pyrohh/macro-cleanup
[RFC] Remove unused TERMINAL_OPTIONS_INIT() macro
2015-11-15 13:02:53 -05:00
Marco Hinz
9fcd444036 Add TermClose event
A terminal buffer now exits with: [Process exited <return value>]

You can hook into it. E.g.  :au TermClose * call feedkeys('<cr>')

Closes #2293.
2015-11-15 15:10:02 +01:00
Marco Hinz
ac4db4b814 TermEnter -> TermOpen 2015-11-15 15:09:47 +01:00
Michael Reed
be72048a8e Remove unused TERMINAL_OPTIONS_INIT() macro
It's not used after aa9cb48
2015-11-14 17:33:49 -05:00
oni-link
1c43452afc memory.c: Prevent garbage collection when running out of memory.
When running out of memory, garbage collection would free lists and
dictionaries that are not yet referenced. This would later on lead to
a use-after-free for these objects.

Releated to vim-patch:7.4.916, so also updating version.c.

Patch by @ZyX-I
2015-11-13 15:59:46 +01:00
oni-link
1d9ae27e38 normal.c: No garbage collection while handling an event in normal mode
Patch by @tarruda

Fixes #3588
2015-11-13 15:59:46 +01:00
Wayne Rowcliffe
eed4df33f9 Cleanup from review 2015-11-11 21:21:19 -06:00
Wayne Rowcliffe
81f32bd153 Switch comments to match style guide 2015-11-11 21:19:52 -06:00
Wayne Rowcliffe
6cfb81eaa7 Updates from review 2015-11-11 21:19:52 -06:00
Wayne Rowcliffe
a9dfcb7e02 Fix shadowed variable in build_stl_str_hl 2015-11-11 21:19:52 -06:00
Wayne Rowcliffe
d12f328b60 Add documentation about what TABPAGENR and TABCLOSENR do 2015-11-11 21:19:51 -06:00
Wayne Rowcliffe
7c32d86f7d Fix lint 2015-11-11 21:19:51 -06:00
Wayne Rowcliffe
12e53ca95c Add out_end_p to mark last valid character in statusline buffer 2015-11-11 21:19:51 -06:00
Wayne Rowcliffe
9e5a7d3751 Rename build_stl_str_hl input and output buffer pointers 2015-11-11 21:19:51 -06:00
Wayne Rowcliffe
cde2259a6b Add comments to build_stl_str_hl 2015-11-11 21:19:51 -06:00
Wayne Rowcliffe
bf8038702d Clean up buffer.c build_stl_str_hl variable declarations 2015-11-11 21:19:51 -06:00
Justin M. Keyes
5434a05457 Merge pull request #3651 from mhinz/remove-nvimrc-refs
Remove all invalid nvimrc references
2015-11-11 17:37:07 -05:00
Marco Hinz
85b1052c3c Remove all invalid nvimrc and ngvimrc references
"vimrc" refers to all files that are used to configure Neovim. The main
configuration file is init.vim nowadays.

All nvimrc references that are left refer to a local ".nvimrc" which is read
if 'exrc' is set. ".ngvimrc" references were completely wiped.

Closes #3552.
2015-11-11 22:50:14 +01:00
Marco Hinz
bb43d9b9a2 vim-patch:7.4.791 #3078
Problem:  The buffer list can be very long.
Solution: Add an argument to ":ls" to specify the type of buffer to list.
          (Marcin Szamotulski)

d51cb706a4
2015-11-11 21:46:46 +01:00
Michael Reed
2fbcc9ab76 Be more explicit about the lack of X11 integration
I don't want anyone getting the idea that the `-X` flag they might have
used has anything to do with why the `+` is working for them
2015-11-10 20:10:55 -05:00
Shougo Matsushita
3b615980c8 vim-patch:7.4.651 #3644
Problem:    Can't match "%>80v" properly for multi-byte characters.
Solution:   Multiply the character number by the maximum number of bytes in a
            character. (Yasuhiro Matsumoto)

4f36dc3bf7
2015-11-10 18:26:35 +01:00
Marco Hinz
3b12bb225a Add file selection prompt on ":oldfiles!"
:browse was removed for good, but some people miss ":browse oldfiles".

The same functionality is now provided by ":oldfiles!".

Helped-by: @Pyrohh
2015-11-10 03:13:31 +01:00
Marco Hinz
1902ee52ef Add ":profile stop"
This writes the logfile and stops profiling.
2015-11-10 02:49:47 +01:00
Marco Hinz
588bf76650 Add ":profile dump"
Currently the logfile (":profile start {logfile}") only gets written when Vim
exits. This new command allows to dump the log immediately without exiting.
2015-11-10 02:49:47 +01:00
Marco Hinz
e4d9176e4d Remove unused constants 2015-11-10 02:49:47 +01:00
Thiago de Arruda
df37aa6115 eval: Implement dictionary change notifications 2015-11-09 09:43:30 -03:00
Thiago de Arruda
ba1f327200 eval: Extract find_var_ht_dict from find_var_ht 2015-11-09 09:41:08 -03:00
Thiago de Arruda
80a44c0525 eval: Extract find_ufunc from get_dict_callback 2015-11-09 09:41:08 -03:00
Johan Klokkhammer Helsing
f65e7bf30c vim-patch:7.4.686 #3629
Problem:    "zr" and "zm" do not take a count.
Solution:   Implement the count, restrict the fold level to the maximum
            nesting depth.  (Marcin Szamotulski)

7d2757a472
2015-11-08 17:06:33 +01:00
Michael Reed
c40dff6453 Remove :open command
From the documentation itself:

  :[range]o[pen]                 Works like |:visual|: end Ex mode.
                                 {Vi: start editing in open mode}
  ...

  Vim does not support open mode, since it's not really useful.  For
  those situations where ":open" would start open mode Vim will leave Ex
  mode, which allows executing the same commands, but updates the whole
  screen instead of only one line.

Part of the reason behind this is to make removing vi_diff.txt easier,
although it's also because :open is not too useful.

Helped-by: @fdinoff
Helped-by: @dsummersl
Helped-by: @mhinz
Helped-by: @justinmk
2015-11-07 14:33:10 -05:00
Justin M. Keyes
2bc97b2099 IWYU: remove unused "version.h" 2015-11-05 23:22:09 -05:00
ZyX
96dc38b3c8 undo: Remove incorrect NONNULL_ALL attribute
Fixes #3605
2015-11-05 23:34:48 +03:00
Justin M. Keyes
d0401b04a4 build: Use git describe for version strings.
When building in a git repo:
  - If HEAD corresponds to an annotated tag, (i.e. git_get_exact_tag()
    returns truthy) the current build is considered a "release" build:
    NVIM_VERSION_MEDIUM is directly assigned the tagged version name,
    and NVIM_VERSION_* defines are ignored.
  - If HEAD is not a tagged release, then NVIM_VERSION_MEDIUM is
    directly assigned the result of `git describe`.

If git (or the repo) is not available:
  - The NVIM_VERSION_* defines are used to define NVIM_VERSION_MEDIUM.

Sample outputs for `nvim --version` and `nvim +version`:

    Building with git @ non-tagged commit e66df14:
      NVIM v0.1.0-1-ge66df14 (compiled Nov  1 2015 19:10:30)
      Commit: e66df148f9401be17adab324a6e41d927aae20b3

    Building with git @ v0.1.1 tag:
      NVIM v0.1.1 (compiled Nov  1 2015 19:03:52)
      [no "Commit:" line]

    Building this commit _not_ in a git repo:
      NVIM 0.1.0-dev (compiled Nov  1 2015 19:16:11)
      [no "Commit:" line]
2015-11-01 21:31:29 -05:00
Michael Reed
0c54dc5528 Remove useless FEAT_BROWSE ifdef
The only thing this affected was the return value of
has('browsefilter').
2015-11-01 14:36:23 -05:00
Florian Walch
a83020922d version: Prepare for releases.
* Hide commit information from --version if we can't find any (e.g. when
  building from tarball).

To define a release in CMake, set NVIM_VERSION_PRERELEASE to "".
This will modify --version output to:

    * Show annotated Git tag instead of commit hash (NVIM_VERSION_COMMIT).
    * Hide commit date (NVIM_VERSION_BUILD).
2015-11-01 15:41:36 +01:00
Florian Walch
cb87ea7e82 CMake: Disable logging for release build types.
These are: Release, MinSizeRel, and RelWithDebInfo.

Closes #2913.
2015-11-01 15:41:36 +01:00
Thiago de Arruda
0dac666098 ui_bridge: Fix race condition that results in deadlock.
Fixed by waiting until the UI thread finishes processing events. Close #3541.
2015-10-31 08:03:49 -03:00
Michael Reed
3f8a2faff4 os/fs.c: Convert stray getenv() to os_getenv()
This is the last direct getenv() call in the tree (besides the one in
os_getenv()); most of the work was already done in [1].

[1]: 412d246be7
2015-10-31 02:05:58 -04:00
Justin M. Keyes
d1cfaa0a55 Merge pull request #3553 from ZyX-I/fix-xdg-2
Some more fixes to XDG code
2015-10-30 12:45:34 -04:00
ZyX
ffdf9399ba undo: Automatically create undo directory if needed 2015-10-29 19:34:26 +03:00
ZyX
d99941777d undo: Do some refactoring
Specifically refactor u_get_undo_file_name which will be modified to
automatically create undo directory and replace `char_u` with `char` in some of
the related functions.
2015-10-29 19:34:25 +03:00
ZyX
1af15494c2 stdpaths: Document that stdpaths_*_subpath is not returning NULL 2015-10-29 19:34:25 +03:00