'shellxquote' Nvim default was adjusted in: 131aad953c
The use of "/s" is different than Vim, and may avoid the need for `shellxquote="&|<>()@^`.
For the other shells, Nvim intentionally does not fiddle with the
various "shell*" options if 'shell' is set by the user: if the user sets
'shell', they are expected to set other "shell*" options correctly.
(Most of this patch is intentionally dropped, it adds far too much
special-cases for almost zero purpose: ":help shell-powershell" makes it
easy to choose powershell without spreading special-cases throughout the
codebase, randomly changing slash behavior, etc.)
Problem: Shell options are not set properly for PowerShell.
Solution: Use better option defaults. (Mike Willams, closesvim/vim#8459)
127950241e
Co-authored-by: Mike Williams <mikew@globalgraphics.com>
Problem: Not enough testing for shell use.
Solution: Add a bit more testing. (Yegappan Lakshmanan, closesvim/vim#8469)
ffec6dd16a
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: Testing the shell option is incomplete and spread out.
Solution: Move shell tests to one file and increase coverage. (Yegappan
Lakshmanan, closesvim/vim#8464)
054794c20f
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
PROBLEM:
exepath("test") should prefer ".bat" when shell=powershell.
Current behavior differs from Vim 8.2.3071.
TEST CASE:
1. in a folder which is in $PATH, create files "test" "test.bat".
- "(Get-Command test).Path test" returns "test.bat".
2. compare nvim:
nvim --clean
:set shell=powershell
:echo exepath("test")
3. should returns "path\to\test.bat" (before this patch it returns "path\to\test").
SOLUTION:
After this patch, the binary files "text.exe", "test.bat", "test.com"
will be found, but the file "test" (without any extension) will not be
found (matches Vim 8.2.3071). But powershell's `where` and
`Get-Command` _do_ find the extensionless 'test' file.
But Nvim with ":set shell=cmd.exe", doesn't find "test" either (before
and after this patch), even though `where test` returns correct path in
cmd.
- `where` is a program to find files in general, not just executable files.
-`Get-Command` returning extensionless (and thus non-executable) file is
puzzling even to Chris Dent, [PowerShell expert][1] (asked on
Discord).
[1]: https://www.amazon.com/Mastering-PowerShell-Scripting-Automate-environment-ebook/dp/B0971MG88X
Co-authored-by: Enan Ajmain <3nan.ajmain@gmail.com>
Helped-by: erw7 <erw7.github@gmail.com>
Fixes#21045
- Use the correct fd to replace stdin on windows (CONIN)
- Don't start the TUI if there are no tty fd (not a regression,
but makes sense regardless)
- De-mythologize "global input fd". it is just STDIN.
Running "make lintlua" will run both stylua and luacheck if both exist.
But this is not necessary as we already lint with stylua with the
stylua-action, so we only need to lint with luacheck on our own.
clint takes around 5-10 seconds to lint tui/terminfo_defs.h. For CI this
is negligible, but it's annoying for local development as touching
terminfo_defs.h will skyrocket lint times. Furthermore, we have no
reason to touch or modify terminfo_defs.h as it's a generated file, so
linting it shouldn't be necessary. This should speed up "make lint" by
the same amount, so around 5-10 seconds.
Since before_each() doesn't call clear() in these tests, after_each()
may call expect_exit() without calling clear() if a test is skipped,
causing frequent test failures on Cirrus CI. Close the session instead.
Problem: Check commands don't work well with Vim9 script.
Solution: Improve constant expression handling.
7f829cab35
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: No command line completion for :profile and :profdel.
Solution: Implement completion. (Yegappan Lakshmanan, closesvim/vim#9955)
1fdf84e033
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: No command line completion for :breakadd and :breakdel.
Solution: Add completion for :breakadd and :breakdel. (Yegappan Lakshmanan,
closesvim/vim#9950)
6e2e2cc95b
Problem: Cannot use page-up and page-down in the command line completion
popup menu.
Solution: Check for to page-up and page-down keys. (Yegappan Lakshmanan,
closesvim/vim#9960)
5cffa8df7e
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: Cmdline popup menu not removed when 'lazyredraw' is set.
Solution: Temporarily reset 'lazyredraw' when removing the popup menu.
(closesvim/vim#9857)
5c52be40fb
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Code is indented more than needed.
Solution: Split ExpandEscape() in two. (Yegappan Lakshmanan, closesvim/vim#11539)
68353e5270
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: Expand functions use confusing argument names.
Solution: Rename "file" to "match". Refactor some completion code. Add a
few more tests. (Yegappan Lakshmanan, closesvim/vim#9790)
2438430863
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
IWYU stopped working after 438b4361cc,
likely due to the code being moved from CMakeLists.txt to
src/nvim/CMakelists.txt. Using the IWYU target property instead of the
variable ensures that the information to use IWYU isn't lost.
Problem: Some command completion functions are too long.
Solution: Refactor code into separate functions. Add a few more tests.
(Yegappan Lakshmanan, closesvim/vim#9785)
b31aec3b93
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closesvim/vim#11813)
e857598896
Partial port as this depends on some previous eval and 'smoothscroll'
patches.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: Command line executed when typing Esc in the GUI.
Solution: Move saving/restoring KeyTyped to build_stl_str_hl().
(closesvim/vim#9783)
0e1f36fc59
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: A custom 'tabline' may cause Esc to work like Enter on the
command line when the popup menu is displayed.
Solution: Save and restore KeyTyped. (closesvim/vim#9776)
e4835bf340
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: A custom statusline may cause Esc to work like Enter on the
command line when the popup menu is displayed.
Solution: Save and restore KeyTyped. (closesvim/vim#9749)
481acb1141
Co-authored-by: Bram Moolenaar <Bram@vim.org>
when using the rbuffer as a linear buffer, exactly filling the buffer
will case write_ptr to wrap around too early. For now detect this
special case.
Of course, the rbuffer should refactored to a proper ring buffer where
write_pos >= read_pos always and there is no special case for full
buffers. This will be a follow up change.
Problem: Command line not redrawn when finishing popup menu and the screen
has scrolled up.
Solution: Redraw the command line after updating the screen. (closesvim/vim#9722)
414acd342f
Code change is N/A as Nvim doesn't call update_screen() here.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: CTRL-A does not work properly with the cmdline popup menu.
Solution: Fix issues with CTRL-A. Add more tests for the cmdline popup
menu. Remove TermWait() before VeriryScreenDump(). Refactor the
cmdline popup code. (Yegappan Lakshmanan, closesvim/vim#9735)
560dff49c0
Only port cmdexpand.c and test_cmdline.vim changes.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>