Commit Graph

7557 Commits

Author SHA1 Message Date
Justin M. Keyes
a767fee8cd eval: set_ref_in_item(): remove dead code
Missed in 25438f149f
2017-02-06 03:05:16 +01:00
Justin M. Keyes
b77cad183d vim-patch:8.0.0275
Problem:    When checking for CTRL-C typed the GUI may detect a screen resize
            and redraw the screen, causing trouble.
Solution:   Set updating_screen in ui_breakcheck().

e3caa11090
2017-02-06 01:21:01 +01:00
Justin M. Keyes
bb2f36d038 Merge #6038 from justinmk/win32-executable
win: executable()
2017-02-05 01:11:06 +01:00
Marco Hinz
b0cf071d43
Fix clint issues 2017-02-04 17:55:46 -05:00
Marco Hinz
d3f97232e8
Make Nvim work with latest vim-patch v7.4.2024
v7.4.2024 changed a few function signatures of functions that we use in
Neovim-specific code, e.g. the API.

Due to that the commit for 7.4.2024 doesn't build on its own, only together with
this commit.
2017-02-04 17:55:46 -05:00
Marco Hinz
c05e7f0fdd
vim-patch:7.4.2024
Problem:  More buf_valid() calls can be optimized.
Solution: Use bufref_valid() instead.

NOTE: Some changes related to channels and the Python and Netbeans interfaces
were obviously left out.

7c0a2f367f
2017-02-04 17:55:46 -05:00
Marco Hinz
e3b92c77da
vim-patch:7.4.2023
Problem:  buflist_findname_stat() may find a dummy buffer.
Solution: Set the BF_DUMMY flag after loading a dummy buffer. Start
          finding buffers from the end of the list.

NOTE: In Neovim, buflist_findname_stat() was replaced by
buflist_findname_file_id() in c41535d69.

ea3f2e7be4
2017-02-04 17:55:45 -05:00
Marco Hinz
d60d1b3232
vim-patch:7.4.2022
Problem:  Warnings from 64 bit compiler.
Solution: Add type casts. (Mike Williams)

25065ec375
2017-02-04 17:55:45 -05:00
Marco Hinz
1836f3cb9b
vim-patch:7.4.2021
Problem:  Still too many buf_valid() calls.
Solution: Make au_new_curbuf a bufref.  Use bufref_valid() in more places.

19ff9bf454
2017-02-04 17:55:45 -05:00
Marco Hinz
e177226d51
vim-patch:7.4.2018
Problem:  buf_valid() can be slow when there are many buffers.
Solution: Add bufref_valid(), only go through the buffer list
          when a buffer was freed.

b25f9a97e9
2017-02-04 17:55:29 -05:00
Marco Hinz
951dd1571c
vim-patch:7.4.2017
Problem:  When there are many errors adding them to the quickfix list takes
          a long time.
Solution: Add BLN_NOOPT.  Don't call buf_valid() in buf_copy_options().
          Remember the last file name used.  When going through the buffer
          list start from the end of the list.  Only call buf_valid() when
          autocommands were executed.

8240433f48
2017-02-04 17:15:11 -05:00
Justin M. Keyes
1ec52b893a vim-patch:8.0.0274
Problem:    When update_single_line() is called recursively, or another screen
            update happens while it is busy, errors may occur.
Solution:   Check and update updating_screen. (Christian Brabandt)

070b33da93
2017-02-04 17:43:42 +01:00
Justin M. Keyes
18127f64c4 test: executable(): AppVeyor: Ignore "sibling" failure
This test sometimes fails on AppVeyor, but we still want to exercise the
code path and get at least a "soft" notification in the pending list.
2017-02-04 11:07:50 +01:00
Justin M. Keyes
ea449b16b9 refactor: fix warnings 2017-02-04 11:07:50 +01:00
Justin M. Keyes
67fbbdb1b5 win: executable(): full path without extension
Absolute path is considered executable even *without* an extension.
2017-02-04 11:07:50 +01:00
Justin M. Keyes
cd5b131575 vim-patch:8.0.0280
patch 8.0.0280: problem setting multi-byte environment var on MS-Windows

Problem:    On MS-Windows setting an environment variable with multi-byte
            strings does not work well.
Solution:   Use wputenv when possible. (Taro Muraoka, Ken Takata)

7c23d1d9d9cc
2017-02-04 11:07:49 +01:00
Justin M. Keyes
978c95e5c4 test: helpers.clear(): Set common env vars only if not passed. 2017-02-04 11:07:49 +01:00
Justin M. Keyes
bbfdb84ae1 build: Do not force busted into front of $PATH
This was a workaround from long ago, but it doesn't seem to be needed
anymore. And it breaks the $PATH on the Windows build (AppVeyor CI).

After this change python3 (and 2) is correctly detected on AppVeyor CI.

References #5946
2017-02-04 11:07:49 +01:00
Justin M. Keyes
611411bf85 CheckHealth: choose correct $PATH separator 2017-02-04 11:07:49 +01:00
Justin M. Keyes
224f99b85d win: Append process dir to $PATH
This allows executables to be found by :!, system(), and executable() if
they live next to ("sibling" to) nvim.exe. This is what gvim on Windows
does, and also matches the behavior of Win32 SearchPath().

c4a249a736/src/os_win32.c (L354-L370)
2017-02-04 11:07:49 +01:00
Rui Abreu Ferreira
7d58aba80c test: executable() 2017-02-04 11:07:49 +01:00
Justin M. Keyes
8371d6fb07 win: executable()
Windows: prepend `".;"` to PATH, as Vim does.
c4a249a736/src/os_win32.c (L1916)
2017-02-04 11:07:49 +01:00
Anmol Sethi
3d3b1641d0 man.vim: more robust s:verify_exists #6043
Closes #6039

Also: close the window if we could not get the page from man but only if
we opened it ourselves.
2017-02-04 10:02:59 +01:00
Justin M. Keyes
6d4e08d226 test: Remove whitespace (avoid LF/CRLF discrepancy) 2017-02-04 04:04:27 +01:00
Justin M. Keyes
4b7d3aec04 Revert "tui: update_size(): Fix race condition."
This reverts commit 0e75438a38.
2017-02-04 03:25:36 +01:00
Justin M. Keyes
5ef619eb33 Revert "build: LuaRocks: require unzip (#6049)"
This reverts commit 54293b73d4.
2017-02-04 03:25:17 +01:00
Lucas Hoffmann
bea2e5738d tests: Migrate legacy test 8. #4179
The test produces some "hit enter" prompts and error messages that had to be
dealt with by `feed`ing CTRL-L to nvim.
2017-02-03 23:05:08 +01:00
Justin M. Keyes
6239492d9c Merge #2990 'tests: Migrate legacy test 69.' 2017-02-03 22:55:05 +01:00
Matthieu Coudron
54293b73d4 build: LuaRocks: require unzip (#6049) 2017-02-04 01:03:04 +01:00
Lucas Hoffmann
b4c172d612 tests: Modernize migrated legacy test 69. 2017-02-03 22:54:38 +01:00
James McCoy
11f2bd5fa3 Merge pull request #6050 from jamessan/fix-xclip-tests
Fix xclip tests to cleanup on their own
2017-02-03 11:36:52 -05:00
Justin M. Keyes
0e75438a38 tui: update_size(): Fix race condition.
bridge.width and bridge.height reach ui.c:ui_refresh() when it iterates
through all UIs, so they do not need to be set directly by
tui.c:update_size().

Race found by helgrind:

==18532== Helgrind, a thread error detector
==18532== Copyright (C) 2007-2015, and GNU GPL'd, by OpenWorks LLP et al.
==18532== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info
==18532== Command: ./build/bin/nvim -u NONE --cmd set\ rtp+=~/.vim/bundle/vimfiler.vim,~/.vim/bundle/unite.vim --cmd runtime\ plugin/vimfiler.vim --cmd runtime\ plugin/unite.vim
==18532== Parent PID: 6477
==18532==
==18532== ---Thread-Announcement------------------------------------------
==18532==
==18532== Thread #2 was created
==18532==    at 0x68FA98E: clone (clone.S:73)
==18532==    by 0x5270179: create_thread (createthread.c:102)
==18532==    by 0x5271BE2: pthread_create@@GLIBC_2.2.5 (pthread_create.c:679)
==18532==    by 0x4C32B07: pthread_create_WRK (hg_intercepts.c:427)
==18532==    by 0x4E53A3F: uv_thread_create (in /usr/lib/x86_64-linux-gnu/libuv.so.1.0.0)
==18532==    by 0x6A7154: ui_bridge_attach (ui_bridge.c:89)
==18532==    by 0x6A164C: tui_start (tui.c:116)
==18532==    by 0x6A4CFC: ui_builtin_start (ui.c:89)
==18532==    by 0x55A825: main (main.c:433)
==18532==
==18532== ---Thread-Announcement------------------------------------------
==18532==
==18532== Thread #1 is the program's root thread
==18532==
==18532== ----------------------------------------------------------------
==18532==
==18532== Possible data race during write of size 4 at 0x770E7B4 by thread #2
==18532== Locks held: none
==18532==    at 0x6A3071: update_size (tui.c:759)
==18532==    by 0x6A30DB: sigwinch_cb (tui.c:269)
==18532==    by 0x4D0A54: signal_event (signal.c:44)
==18532==    by 0x4CDDB6: multiqueue_process_events (multiqueue.c:146)
==18532==    by 0x4CD135: loop_poll_events (loop.c:56)
==18532==    by 0x6A2451: tui_main (tui.c:239)
==18532==    by 0x6A857A: ui_thread_run (ui_bridge.c:112)
==18532==    by 0x4E539F6: ??? (in /usr/lib/x86_64-linux-gnu/libuv.so.1.0.0)
==18532==    by 0x4C32D06: mythread_wrapper (hg_intercepts.c:389)
==18532==    by 0x5271423: start_thread (pthread_create.c:333)
==18532==    by 0x68FA9BE: clone (clone.S:105)
==18532==
==18532== This conflicts with a previous read of size 4 by thread #1
==18532== Locks held: none
==18532==    at 0x6A542A: ui_refresh (ui.c:169)
==18532==    by 0x6A5870: ui_refresh_event (ui.c:181)
==18532==    by 0x4CDDB6: multiqueue_process_events (multiqueue.c:146)
==18532==    by 0x4CD135: loop_poll_events (loop.c:56)
==18532==    by 0x5DEDB4: os_breakcheck (input.c:150)
==18532==    by 0x59263D: line_breakcheck (misc1.c:2667)
==18532==    by 0x621AE5: nfa_regmatch (regexp_nfa.c:6171)
==18532==    by 0x61DCF7: nfa_regtry (regexp_nfa.c:6240)
==18532==  Address 0x770e7b4 is 4 bytes inside a block of size 352 alloc'd
==18532==    at 0x4C2EFE5: calloc (vg_replace_malloc.c:711)
==18532==    by 0x57C962: xcalloc (memory.c:119)
==18532==    by 0x6A6E29: ui_bridge_attach (ui_bridge.c:53)
==18532==    by 0x6A164C: tui_start (tui.c:116)
==18532==    by 0x6A4CFC: ui_builtin_start (ui.c:89)
==18532==    by 0x55A825: main (main.c:433)
==18532==  Block was alloc'd by thread #1
==18532==
==18532== ----------------------------------------------------------------
==18532==
==18532== Possible data race during write of size 4 at 0x770E7B8 by thread #2
==18532== Locks held: none
==18532==    at 0x6A3085: update_size (tui.c:760)
==18532==    by 0x6A30DB: sigwinch_cb (tui.c:269)
==18532==    by 0x4D0A54: signal_event (signal.c:44)
==18532==    by 0x4CDDB6: multiqueue_process_events (multiqueue.c:146)
==18532==    by 0x4CD135: loop_poll_events (loop.c:56)
==18532==    by 0x6A2451: tui_main (tui.c:239)
==18532==    by 0x6A857A: ui_thread_run (ui_bridge.c:112)
==18532==    by 0x4E539F6: ??? (in /usr/lib/x86_64-linux-gnu/libuv.so.1.0.0)
==18532==    by 0x4C32D06: mythread_wrapper (hg_intercepts.c:389)
==18532==    by 0x5271423: start_thread (pthread_create.c:333)
==18532==    by 0x68FA9BE: clone (clone.S:105)
==18532==
==18532== This conflicts with a previous read of size 4 by thread #1
==18532== Locks held: none
==18532==    at 0x6A5455: ui_refresh (ui.c:170)
==18532==    by 0x6A5870: ui_refresh_event (ui.c:181)
==18532==    by 0x4CDDB6: multiqueue_process_events (multiqueue.c:146)
==18532==    by 0x4CD135: loop_poll_events (loop.c:56)
==18532==    by 0x5DEDB4: os_breakcheck (input.c:150)
==18532==    by 0x59263D: line_breakcheck (misc1.c:2667)
==18532==    by 0x621AE5: nfa_regmatch (regexp_nfa.c:6171)
==18532==    by 0x61DCF7: nfa_regtry (regexp_nfa.c:6240)
==18532==  Address 0x770e7b8 is 8 bytes inside a block of size 352 alloc'd
==18532==    at 0x4C2EFE5: calloc (vg_replace_malloc.c:711)
==18532==    by 0x57C962: xcalloc (memory.c:119)
==18532==    by 0x6A6E29: ui_bridge_attach (ui_bridge.c:53)
==18532==    by 0x6A164C: tui_start (tui.c:116)
==18532==    by 0x6A4CFC: ui_builtin_start (ui.c:89)
==18532==    by 0x55A825: main (main.c:433)
==18532==  Block was alloc'd by thread #1
2017-02-03 14:04:38 +01:00
Justin M. Keyes
8b804948df Merge #5975 from jamessan/execute-with-attrs
execute: Correctly capture output with highlight attributes
2017-02-03 12:36:17 +01:00
James McCoy
ce51fa0955
test: Turn printargs_path into a function
When test/functional/eval/system_spec.lua is run on its own,
helpers.os_name() was being called before a session had been created.
This caused that describe block to fail.

Turning printargs_path into a function delays the call of
helpers.os_name() until the test is being run, which ensures a session
is available.
2017-02-02 19:52:59 -05:00
James McCoy
7e30fe3157
test: Make xclip exit after one selection request
Closes #4900
2017-02-02 19:52:06 -05:00
James McCoy
e8899178ec Merge pull request #5869 from hardenedapple/undojoin-curhead
Don't set `b_u_curhead` in `ex_undojoin()`
2017-02-02 12:45:02 -05:00
James McCoy
0508192774 Merge pull request #6045 from jamessan/vim-a02a551
vim-patch:a02a551,802a0d9,e18dbe8,063b9d1
2017-02-01 21:10:33 -05:00
James McCoy
8c09dbf082
vim-patch:063b9d1
Updated runtime files.

063b9d15ab
2017-02-01 18:35:12 -05:00
James McCoy
5752bfb224
Run cleanup.vim on {eo,fr}.po 2017-02-01 18:34:58 -05:00
James McCoy
a5b875fe86
vim-patch:e18dbe8
Updated runtime files.

e18dbe865d
2017-02-01 18:34:58 -05:00
James McCoy
4e47568f89
vim-patch:802a0d9
Updated runtime files.

802a0d902f
2017-02-01 18:34:57 -05:00
James McCoy
cb0eead4ee
vim-patch:a02a551
Updated runtime files.

a02a551e18
2017-02-01 18:34:52 -05:00
Justin M. Keyes
f8b21b6d82
test: execute() + :redir 2017-02-01 18:31:53 -05:00
James McCoy
7e7f01a3be
execute: Correctly capture output with highlight attributes
Closes #5422
2017-02-01 18:28:32 -05:00
Justin M. Keyes
3803314f78 doc: QuickBuild 2017-01-31 08:58:43 +01:00
Justin M. Keyes
88bc9f8e92 xstrlcat: Allow overlapped pointers. (#6017)
memcpy is not equivalent to memmove (which is used by vim_strcat), this
could cause subtle bugs if xstrlcat is used as a replacement for
vim_strcat. But vim_strcat is inconsistent: in the `else` branch it uses
strcpy, which doesn't allow overlap.

Helped-by: oni-link <knil.ino@gmail.com>
Helped-by: James McCoy <jamessan@jamessan.com>
Helped-by: Nikolai Aleksandrovich Pavlov <kp-pav@yandex.ru>
2017-01-31 17:42:22 +01:00
Matthew Malcomson
d25649fa01 undo: :earlier, g-: Set b_u_seq_cur correctly. (#6016)
Previously alternate branches were not accounted for properly, with this
change g- after an undo to a branch point works.

The current sequence number b_u_seq_cur is used in undo_time(), in
u_doit() this was calculated by subtracting one from the curhead
sequence number.

The curhead header entry represents the change that was just undone, so
the sequence number we want is that of the change we have moved to. This
is the sequence number of the undo head that is the uh_next element of
this curhead. That sequence number is not always one less than the
curhead sequence number -- there may have been an alternate branch at
this point.

Instead of subtracting one, we now directly find the sequence number of
curhead->uh_next.
2017-01-31 05:46:55 +01:00
Anmol Sethi
39a6f835e7 man.vim: get page after opening split (#6032)
This will ensure that $MANWIDTH is correctly set.
2017-01-31 16:03:45 +01:00
Anmol Sethi
5bcb972a88 man.vim: remove terminal escape characters (#6033)
This will make man.vim work on nixOS.
2017-01-31 16:00:00 +01:00
Matthieu Coudron
7c83657397 dist: runtime/nvim.desktop
Closes #3689

cmake: Add `desktop-install` and `icon-install` targets. `runtime`
target will trigger them.

Specification:
https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#recognized-keys

Icons are stored system-wide in /usr/share/applications or user wide at
/usr/share/icons/hicolor/scalable/apps and can be overriden in ~/.local/share/icons

nvim.desktop file can be installed system wide or in
~/.local/share/applications/

To test without an installer:
$ xdg-desktop-menu install --novendor runtime/nvim.desktop
$ xdg-icon-resource install --novendor --mode user --size 64 contrib/nvim-icon.png

Once it is installed, you can test with gtk-launch if installed or
dmenu/rofi (drun mode)
2017-01-31 02:02:09 +01:00