Commit Graph

15664 Commits

Author SHA1 Message Date
Justin M. Keyes
c8abe931db checkhealth: avoid irrelevant virtualenv executables 2020-02-02 18:25:17 -08:00
Justin M. Keyes
3cd5a8d149 checkhealth: cleanup, brevity 2020-02-02 18:25:17 -08:00
David Lukes
370a33a85d checkhealth: bin directory is Scripts/ on Windows 2020-02-02 16:22:07 -08:00
David Lukes
1b20014972 checkhealth: print -> sys.stdout.write
Co-Authored-By: Peter Lithammer <peter.lithammer@gmail.com>
2020-02-02 16:21:55 -08:00
David Lukes
bf85cc0909 checkhealth: better $VIRTUAL_ENV validation #11781
fix #11753
close #11781

The virtualenv troubleshooting in the Python provider health checks is
supposed to help the user determine whether running Python from Neovim
(as in `system('python')` or `system(exepath('python'))`) will use the
correct executable when a virtualenv is active. Currently however, it
issues spurious warnings in legitimate setups, and conversely, fails to
warn about potentially problematic ones.

See https://github.com/neovim/neovim/issues/11753#issuecomment-578715584
for a more detailed analysis, but at a high level, this is due to two
things:

- the virtualenv check is part of the Python provider check defined in
`s:check_python`, which uses a roundabout and sometimes erroneous way of
determining the Python executable
- more generally, it shouldn't be part of the provider check at all,
because it's not really related to the Python *provider*, i.e. the
Python executable which can communicate with Neovim via `pynvim`, but to
the Python the user is editing source files for, which typically
shouldn't even have `pynvim` installed

This patch reimplements the virtualenv check and factors it out into its
own separate function, which is however still kept in
`health/provider.vim` alongside the rest of the Python troubleshooting,
since troubleshooting all Python-related stuff in one place is probably
a good idea in order to alleviate any potential confusion (e.g. users
who run only provider checks might be left wondering whether their
virtualenv Python was properly detected if the report only shows their
global Python as the provider used by Neovim).
2020-02-02 16:21:55 -08:00
Björn Linse
3051342f96
Merge pull request #11801 from bfredl/incsubcrash
extmark: fix crash due to invalid column values in inccommand preview
2020-02-02 12:50:57 +01:00
Björn Linse
459a362cc1 extmarks: fix crash due to invalid column values in inccommand preview
This used to use -1 and MAXCOL values. Make sure in range values are
used.
2020-02-02 10:50:48 +01:00
Justin M. Keyes
045e86474b
Merge #11802 from janlazo/vim-8.2.0161
vim-patch:8.1.{140,1269},8.2.0161
2020-02-02 01:06:38 -08:00
Jan Edmund Lazo
5032bc8514
vim-patch:8.1.1269: MS-Windows GUI: multibyte chars with a 0x80 byte do not work
Problem:    MS-Windows GUI: multibyte chars with a 0x80 byte do not work when
            compiled with VIMDLL.
Solution:   Adjust the condition for fixing the input buffer. (Ken Takata,
            closes vim/vim#4330)
ed5ab2a959
2020-02-02 03:14:39 -05:00
Jan Edmund Lazo
d6625349f5
vim-patch:8.1.0140: recording into a register has focus events
Problem:    Recording into a register has focus events. (Michael Naumann)
Solution:   Don't record K_FOCUSGAINED and K_FOCUSLOST. (closes vim/vim#3143)
972bfddc6b
2020-02-01 22:15:21 -05:00
Jan Edmund Lazo
9c1a31927d
vim-patch:8.2.0161: not recognizing .gv file as dot filetype
Problem:    Not recognizing .gv file as dot filetype.
Solution:   Add *.gv to dot pattern. (closes vim/vim#5544)
f8ddb25789
2020-02-01 18:06:34 -05:00
Alkeryn
26199fedca
vim-patch:8.2.0190: detect Kotlin files [ci skip] #11796
Problem:    Kotlin files are not recognized.
Solution:   Detect Kotlin files. (Alkeryn, closes vim/vim#5560)
ab067a21b9
2020-02-01 14:15:36 -08:00
Hye Sung Jung
14a8b3b98c
doc: fix typos [ci skip] #11787 2020-01-30 22:56:34 -08:00
Justin M. Keyes
486fa21899
Merge #11795 from janlazo/vim-8.2.0014
vim-patch:8.2.{14,16}
2020-01-30 22:42:34 -08:00
Jan Edmund Lazo
ef11b800ac
vim-patch:8.2.0016: test name used twice, option not restored properly
Problem:    Test name used twice, option not restored properly.
Solution:   Rename function, restore option with "&".
a48e78e11f
2020-01-30 21:30:40 -05:00
Jan Edmund Lazo
63983316bd
vim-patch:8.2.0014: test69 and test95 are old style
Problem:    Test69 and test95 are old style.
Solution:   Convert to new style tests. (Yegappan Lakshmanan, closes vim/vim#5365)
afc13bd827
2020-01-30 21:29:21 -05:00
Axel Forsman
2538e61513
Fix shift change callbacks reading bad cursor (#11782)
Sloppy code inherited from Vim caused user scripts to be able
to observe the cursor line in an invalid intermediary state,
due to Neovim change callbacks being unbuffered unlike Vim listeners.

Manifested in Vimscript executed from the callback possibly erroring
when `:call`:ing any function,
due to the implicit range `curwin->w_cursor.lnum,curwin->w_cursor.lnum`
failing validation.

Fixed by deferring the call to `changed_lines()` until after
`curwin->w_cursor.lnum` gets its correct value.
2020-01-30 07:34:34 +01:00
Justin M. Keyes
4ea5d7d31a
Merge #11792 from janlazo/vim-8.1.0445
vim-patch:8.1.{445,446},8.2.{77,177}
2020-01-29 20:30:23 -08:00
Jan Edmund Lazo
b7447a909f
vim-patch:8.2.0177: memory leak in get_tags()
Problem:    Memory leak in get_tags().
Solution:   Free matches when finding a pseudo-tag line. (Dominique Pelle,
            closes vim/vim#5553)
70b3e706b4
2020-01-29 22:18:58 -05:00
Jan Edmund Lazo
31f31b40a8
vim-patch:8.2.0077: settagstack() cannot truncate at current index
Problem:    settagstack() cannot truncate at current index.
Solution:   Add the "t" action. (Yegappan Lakshmanan, closes vim/vim#5417)
271fa08a35
2020-01-29 21:00:11 -05:00
Jan Edmund Lazo
f719b8898b
vim-patch:8.1.0446: options test fails in the GUI
Problem:    Options test fails in the GUI.
Solution:   Don't try changing 'term' in the GUI.
4f88875725
2020-01-29 20:31:16 -05:00
Jan Edmund Lazo
ca08d5c191
vim-patch:8.1.0445: setting 'term' does not store location for termcap options
Problem:    Setting 'term' does not store location for termcap options.
Solution:   Set the script context for termcap options that are changed when
            'term' is set.
35bc7d6c52
2020-01-29 20:30:40 -05:00
Björn Linse
406464fa6e
CONTRIBUTING.md: mention "good first issue" label 2020-01-29 12:06:35 +01:00
Jan Edmund Lazo
0b49cb67f2
vim-patch:8.2.0171: fix use of uninitialized buffer #11786
Problem:    Coverity warning for using uninitialized buffer.
Solution:   Check the skip flag.
9a5e5a3e33
2020-01-28 23:02:11 -08:00
Björn Linse
01ff9db633
Merge pull request #11780 from bfredl/winhlparse
options: winhighlight: fix incorrect string equality test
2020-01-28 22:23:35 +01:00
Björn Linse
bfe84adb5a options: winhighlight: fix incorrect string equality test 2020-01-28 19:10:41 +01:00
Matthieu Coudron
e956ea7672 LSP: show diagnostic in qf/loclist #11777
instead of the content of the file at this line.

ref https://github.com/neovim/nvim-lsp/issues/69
2020-01-28 01:45:25 -08:00
Justin M. Keyes
b2062368e7
Merge #11775 'refactor: move session fns to ex_session.c'
obviates vim patch:
vim-patch:8.1.1766
2020-01-28 01:35:38 -08:00
erw7
4d0dfb8f75 build/MSVC: fix gettext multibyte issue #11774
Problem:  On Windows with the MSVC build, gettext-translation
          "Questa è già la" displays as "Questa <e8> gi<e0> la".
Solution: Fix iconv detection iconv when building gettext.
          So HAVE_ICONV is correctly defined when building nvim.

* fix gettext mb chars on MSVC
* fix libintl detection failure on MSVC

fixes #11749
2020-01-28 00:56:26 -08:00
Justin M. Keyes
a4b9417c78 lint 2020-01-28 00:22:14 -08:00
Justin M. Keyes
75e8562249 refactor: move session functions to ex_session.c 2020-01-28 00:22:14 -08:00
Justin M. Keyes
d3a9d75c04
Merge #11772 from janlazo/vim-8.2.0152
vim-patch:8.2.{152,158}
2020-01-26 19:54:26 -08:00
Justin M. Keyes
b5daee7b8f
Merge #7836 'session: restore same :terminal buf split windows' 2020-01-26 19:03:43 -08:00
Jan Edmund Lazo
5ede2766c8
vim-patch:8.2.0158: triggering CompleteDone earlier is not backwards compatible
Problem:    Triggering CompleteDone earlier is not backwards compatible.
            (Daniel Hahler)
Solution:   Add CompleteDonePre instead.
3f169ce17e
2020-01-26 21:50:37 -05:00
Jan Edmund Lazo
e673a0df1a
vim-patch:8.2.0152: restoring ctrl_x_mode is not needed
Problem:    Restoring ctrl_x_mode is not needed.
Solution:   Remove restoring the old value, it's changed again soon.
da812e282a
2020-01-26 21:17:54 -05:00
Justin M. Keyes
1c3ca4f18f mksession: always unix slashes "/" for filepaths 2020-01-26 17:30:47 -08:00
Justin M. Keyes
c4f4719ced cleanup/ex_docmd.c: remove most put_eol() calls 2020-01-26 17:13:00 -08:00
Justin M. Keyes
9048627806 lint 2020-01-26 17:13:00 -08:00
Justin M. Keyes
2070c082b5 cleanup/ex_docmd.c: remove most put_line() calls
- prefer fprintf() instead of put_line()
- PUTLINE_FAIL macro to avoid some boilerplate
2020-01-26 17:13:00 -08:00
Justin M. Keyes
2c1d12d0be mksession: always write LF "\n" line-endings
- remove `MKSESSION_NL`, `mksession_nl`
- deprecate the "unix" flag of 'sessionoptions'

There is no reason to choose CRLF or LF for session files. Instead just
always write LF.
2020-01-26 17:13:00 -08:00
Justin M. Keyes
598a1cd7c5 mksession: avoid ":file …" when restoring non-terminal bufs 2020-01-26 17:13:00 -08:00
Justin M. Keyes
1e103b3c12 mksession: simplify generated commands
Doing ":file …" immediately after is enough to fixup the :terminal
buffer name.

ref #5250
2020-01-26 17:13:00 -08:00
Alexandre Dubray
cf67f19ac2 mksession: restore same :term buf in split windows
Problem: When session-restore creates a terminal buffer with command
         like `:edit term://.//16450:/bin/bash`, the buffer gets
         a different name (depends on PID). Thus the later call to
         `bufexists('term://.//16450:/bin/bash)` will return false.
Solution: Force the buffer name with :file. This as least ensures
         the same buffer will show in multiple windows correctly, as
         expected when saving the session.  But it still has problems:
           1. the PID in the buffer name is bogus
           2. redundant :terminal buffers still hang around

fix #5250
2020-01-26 17:13:00 -08:00
Justin M. Keyes
88f133c30d
Merge #11763 'spell: remove non-UTF8 dead code' 2020-01-26 16:42:00 -08:00
Justin M. Keyes
9dc3247850
Merge #11766 from janlazo/vim-8.1.1143
vim-patch:8.1.{1143,1144}
2020-01-26 15:53:23 -08:00
Jan Edmund Lazo
0e1dd0a502
spell: towupper(),towlower() are not called 2020-01-26 17:44:24 -05:00
Jan Edmund Lazo
ad272cd2d7
vim-patch:8.1.1144: too strict checking of the 'spellfile' option
Problem:    Too strict checking of the 'spellfile' option.
Solution:   Allow for a path.
862f1e17ea
2020-01-26 17:38:31 -05:00
Jan Edmund Lazo
08c5a874ab
vim-patch:8.1.1143: may pass weird strings to file name expansion
Problem:    May pass weird strings to file name expansion.
Solution:   Check for matching characters.  Disallow control characters.
8f130eda47
2020-01-26 17:38:30 -05:00
Jan Edmund Lazo
d5322c8381
spellfile: set_spell_chartab() is dead code 2020-01-26 10:33:01 -05:00
Jan Edmund Lazo
eab052eca2
spell_defs: remove enc_utf8 redundant checks 2020-01-26 10:33:01 -05:00