Commit Graph

866 Commits

Author SHA1 Message Date
Shougo
663cbe2620
feat: cmdheight=0 #16251
Fix https://github.com/neovim/neovim/issues/1004

Limitation: All outputs need hit-enter prompt.

Related:
https://github.com/neovim/neovim/pull/6732
https://github.com/neovim/neovim/pull/4382
2022-06-13 02:40:51 -07:00
bfredl
e3281d992e fix(tests): check for EOF on exit of nvim properly 2022-06-13 10:15:44 +02:00
Daniel Hahler
e420cd6c67
test: dismiss quit_more from Lua #11226
Add a test for what #16537 fixed.
2022-06-12 16:45:44 -07:00
Famiu Haque
2de0d67144
fix(inccommand): skip split window if not enough room #18937
Command preview now behaves like inccommand=nosplit when there's not
enough room for the preview window to be opened instead of aborting,
which is consistent with old behavior of 'inccommand'.
2022-06-12 10:59:04 -07:00
bfredl
f4121c52b9 fix(messages): add color when showing nvim_echo in :messages history 2022-06-11 22:29:51 +02:00
zeertzjq
2b539d6fdf
fix(inccommand): clear cmdpreview state if preview is not shown (#18923) 2022-06-11 13:04:19 +08:00
zbirenbaum
df70a3abcd fix(highlight): let winhighlight use cursor 2022-06-07 02:15:32 -04:00
zeertzjq
57a296d899
fix(inccommand): avoid crash if callback changes inccommand option (#18830)
clang: Result of operation is garbage or undefined
clang: Uninitialized argument value

Also check for == 's' instead of != 'n' as it is more straightforward.

Also fix another unrelated PVS warning:
PVS/V1071: Return value of win_comp_pos() is not always used
2022-06-02 03:48:36 +08:00
zeertzjq
19e80738e0
fix(screen): restart win_update() if a decor provider changes signcols (#18768) 2022-06-01 22:53:29 +08:00
zeertzjq
f40adf770d
fix(inccommand): do not try to preview an ambiguous command (#18827) 2022-06-01 20:17:52 +08:00
Famiu Haque
46536f53e8 feat: add preview functionality to user commands
Adds a Lua-only `preview` flag to user commands which allows the command to be incrementally previewed like `:substitute` when 'inccommand' is set.
2022-05-31 20:55:05 +06:00
zeertzjq
d4bb15af52
test: add tests for inccommand with c_CTRL-R_= and c_CTRL-\_e (#18796) 2022-05-29 20:52:53 +08:00
zeertzjq
015656abd7
fix(winbar): set w_winrow_off when initializing firstwin size (#18793) 2022-05-29 16:26:55 +08:00
Famiu Haque
9cf1ac0377 fix(winbar): only allow adding winbar when there is space 2022-05-28 15:29:56 +06:00
zeertzjq
77d9c672f8
fix(winbar): fix winbar disappear or glitch when moving a split (#18775) 2022-05-28 15:12:42 +08:00
Famiu Haque
826462a8f0
fix(ui): require window-local value to show winbar on floating windows (#18773)
Previously, there was a bug where setting the local value of 'winbar' to
itself would cause winbar to appear on a floating window, which is
undesirable. This fix makes it so that it's explicitly required for the
window-local value of 'winbar' for a floating window to be set in order
for winbar to be shown on that window.
2022-05-28 06:57:20 +08:00
Famiu Haque
4c6626f03d
feat: click support for 'statusline', 'winbar' #18650
The mouseclick item "%@" is now supported by 'statusline' and 'winbar'.
Previously it was only supported by 'tabline'.
2022-05-23 06:11:24 -07:00
bfredl
060ef52d8b fix(winbar): allow winbar to display the ruler 2022-05-22 18:56:07 +02:00
bfredl
e01c197eab fix(tests): fix some issues with ui/inccommand_spec.lua causing slowness
from ~30 to ~20 secs with ASAN build

- feedkeys test: the same substitute was repeated, and not even correctly spelled
- don't clear() in a tight loop. "bwipe!" is enough to erase undo history
- error in cnoremap mapping causes a check_for_delay(). <c-c> it away.
2022-05-22 16:17:37 +02:00
zeertzjq
70e3caec4a
fix(folds): fix fold regression with :move (#18685) 2022-05-22 21:03:22 +08:00
bfredl
e7b3fd8ad6
Merge pull request #18681 from bfredl/uitest
fix(tests): fix some screen.lua warnings
2022-05-22 14:32:38 +02:00
devbhan singh
646e1c3a3a feat(ui): clear message history explicitly with msg_history_clear event 2022-05-21 23:22:23 +02:00
bfredl
3c1bc75447 fix(tests): fix some screen.lua warnings 2022-05-21 23:07:34 +02:00
bfredl
69853a622a
Merge pull request #18629 from famiu/fix/ui/winbar
fix(ui): make `winbar` properly equalize window heights for local value
2022-05-19 21:58:48 +02:00
Famiu Haque
643cc94e7e fix(ui): make winbar properly equalize window heights for local value
Fixes `'winbar'` not properly equalizing window heights for splits when
the global value is empty and a window-local value is set instead.
2022-05-19 19:14:54 +06:00
zeertzjq
f971536f46 fix(mouse): fix mouse drag position with winbar or border in multigrid 2022-05-19 19:16:49 +08:00
zeertzjq
0997884ae2 fix(mouse): fix mouse drag position with winbar 2022-05-19 19:16:31 +08:00
bfredl
6f0baa0bb7
Merge pull request #18620 from bfredl/multibar
fix(ui): make winbar work with floats and multigrid
2022-05-18 21:18:34 +02:00
bfredl
17758fe7ad fix(ui): make winbar work with floats and multigrid 2022-05-18 20:16:18 +02:00
Famiu Haque
288819c9cc fix(ui): set correct position on mouse click when 'winbar' is enabled 2022-05-18 21:15:34 +06:00
bfredl
d7dd600716
Merge pull request #18562 from famiu/feat/ui/winbar
feat(ui): add `'winbar'`
2022-05-18 13:08:07 +02:00
zeertzjq
6e414b698c
test: unskip tests on Windows (#18600)
Remove the command('qall!') from mksession_spec.lua because it prevents
helpers.rmdir() from retrying.

Allow extra trailing spaces when matching terminal lines.
2022-05-18 12:57:04 +08:00
Famiu Haque
e1bdb2a258 feat(ui): add 'winbar'
Adds support for a bar at the top of each window, enabled through the
`'winbar'` option.

Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
2022-05-18 09:27:08 +06:00
Famiu Haque
bbf58e6bbc refactor(ui)!: link VertSplit to Normal by default
Avoids using `gui=reverse` on `VertSplit` and makes window separators
look much nicer by default.
2022-05-15 22:37:35 +06:00
zeertzjq
030417d80b
revert: "feat(mappings): do not simplify the rhs of a mapping" (#18553)
This reverts commit 7ac5359143.
This fix can cause more problems than it solves.
2022-05-13 11:31:17 +08:00
shirasaka
b5957c3c32 fix: display global statusline correctly with ext_messages 2022-05-05 06:15:09 +09:00
bfredl
4df11463b2
Merge pull request #15674 from yatli/ui_event_extmark
API/UI: ui_event_extmark
2022-05-03 16:59:24 +02:00
Yatao Li
29a6cda3ff feat(api/ui): win_extmarks 2022-05-03 22:26:02 +08:00
Justin M. Keyes
4fb48c5654
feat(server): set $NVIM, unset $NVIM_LISTEN_ADDRESS #11009
PROBLEM
------------------------------------------------------------------------
$NVIM_LISTEN_ADDRESS has conflicting purposes as both a parameter ("the
current process should listen on this address") and a descriptor ("the
current process is a child of this address").

This contradiction means the presence of NVIM_LISTEN_ADDRESS is
ambiguous, so child Nvim always tries to listen on its _parent's_
socket. This is the cause of lots of  "Failed to start server" spam in
our test/CI logs:

    WARN  2022-04-30… server_start:154: Failed to start server: address already in use: \\.\pipe\nvim-4480-0
    WARN  2022-04-30… server_start:154: Failed to start server: address already in use: \\.\pipe\nvim-2168-0

SOLUTION
------------------------------------------------------------------------

1. Set $NVIM to the parent v:servername, *only* in child processes.
   - Now the correct way to detect a "parent" Nvim is to check for $NVIM.
2. Do NOT set $NVIM_LISTEN_ADDRESS in child processes.
3. On startup if $NVIM_LISTEN_ADDRESS exists, unset it immediately after
   server init.
4. Open a channel to parent automatically, expose it as v:parent.

Fixes #3118
Fixes #6764
Fixes #9336
Ref https://github.com/neovim/neovim/pull/8247#issuecomment-380275696
Ref #8696
2022-05-03 06:08:35 -07:00
bfredl
ad63b94b03 refactor(ui): simplify stdin handling 2022-05-02 22:19:41 +02:00
zeertzjq
7ac5359143 feat(mappings): do not simplify the rhs of a mapping 2022-04-29 21:12:48 +08:00
zeertzjq
3601cef137 feat(mappings): do not replace existing mapping for simplified form 2022-04-29 15:51:04 +08:00
zeertzjq
04a437b280 vim-patch:8.2.4504: when there is a partially matching map full map may not work
Problem:    When there is a partially matching map and modifyOtherKeys is
            active a full map may not work.
Solution:   Only simplify modifiers when there is no matching mapping.
            (closes vim/vim#8792)
196c3850db

Omit test as it sends terminal codes. Use a Lua test instead.
2022-04-29 15:51:04 +08:00
zeertzjq
78a7e2d55c vim-patch:8.1.2346: CTRL-R CTRL-R doesn't work with modifyOtherKeys
Problem:    CTRL-R CTRL-R doesn't work with modifyOtherKeys.
Solution:   Allow key codes when fetching argument for CTRL-R. (closes vim/vim#5266)
            Also fix CTRL-G in Insert mode.
38571a04b4

Omit test as it sends terminal codes. Use a Lua test instead.
2022-04-29 15:51:04 +08:00
zeertzjq
32da3e56cd vim-patch:8.2.0916: mapping with partly modifyOtherKeys code does not work
Problem:    Mapping with partly modifyOtherKeys code does not work.
Solution:   If there is no mapping with a separate modifier include the
            modifier in the key and then try mapping again. (closes vim/vim#6200)
975a880a13

Cherry-pick applicable part of put_string_in_typebuf().
Revert related changes from 10a5825.
Use KEYLEN_PART_KEY for incomplete modifier sequence.
Omit test as it sends terminal codes. Use a Lua test instead.
2022-04-29 15:51:04 +08:00
zeertzjq
66747f18de vim-patch:8.2.0839: dropping modifier when putting a character back in typeahead
Problem:    Dropping modifier when putting a character back in typeahead.
Solution:   Add modifier to ins_char_typebuf(). (closes vim/vim#6158)
b42c0d5427

Vim's test doesn't seem to work properly as the hit-enter prompt seems
to be delayed. Add a Lua screen test.
2022-04-29 15:51:04 +08:00
zeertzjq
519e4c4472 test: correct order of arguments to eq() and neq() 2022-04-26 11:38:58 +08:00
zeertzjq
8db55aedb5 vim-patch:8.2.4805: CurSearch used for all matches in current line
Problem:    CurSearch used for all matches in current line.
Solution:   Don't use the non-zero line count. (closes vim/vim#10247)
9b36750640
2022-04-23 19:24:47 +08:00
zeertzjq
4b19f94c28 vim-patch:8.2.4759: CurSearch highlight does not work for multi-line match
Problem:    CurSearch highlight does not work for multi-line match.
Solution:   Check cursor position before adjusting columns. (closes vim/vim#10133)
693ccd1160
2022-04-21 20:19:58 +08:00
zeertzjq
8145357974 vim-patch:8.2.4724: current instance of last search pattern not easily spotted
Problem:    Current instance of last search pattern not easily spotted.
Solution:   Add CurSearch highlighting. (closes vim/vim#10133)
a43993897a

This fixes CurSearch highlight for multiline match.
Omit screen redrawing code because Nvim redraws CurSearch differently.
2022-04-21 06:24:11 +08:00