Commit Graph

554 Commits

Author SHA1 Message Date
Shougo Matsushita
81a1d26c3e vim-patch:9.0.0114: the command line takes up space even when not used
Problem:    The command line takes up space even when not used.
Solution:   Allow for 'cmdheight' to be set to zero. (Shougo Matsushita,
            closes vim/vim#10675, closes vim/vim#940)
f39cfb7262

Omit win_redr_ruler() change: winbar may still need redraw.
Omit win_update() changes: Nvim doesn't use `Rows` there.
Omit redraw_asap(): removed.
2022-07-31 17:15:36 +08:00
dundargoc
abc087f4c6
docs: fix typos (#19024)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Valery Viktorovsky <viktorovsky@gmail.com>
2022-07-31 16:46:38 +08:00
Christian Clason
4cbeedf57b
vim-patch:b529cfbd04c0 (#19501)
Update runtime files
b529cfbd04
2022-07-26 11:26:23 +02:00
matveyt
eb9b93b5e0
feat(defaults): mouse=nvi #19290
Problem:
Since right-click can now show a popup menu, we can provide messaging to
guide users who expect 'mouse' to be disabled by default. So 'mouse' can
now be enabled by default.

Solution:
Do it.
Closes #15521
2022-07-17 04:14:04 -07:00
Jay
93c8fe77cb
feat: add 'mousescroll' option (#12355)
Add 'mousescroll' option to control how many lines to scroll by when a
mouse wheel keycode is received. The mousescroll option controls both
horizontal and vertical scrolling. The option is a string in the format:

    set mousescroll=direction:count,direction:count

Where direction is either "ver" or "hor", and count is a non negative
integer. If a direction is omitted, a default value is used. The default
values remain unchanged, that is 3 for vertical scrolling, and 6 for
horizontal scrolling. As such, the mousescroll default is "ver:3,hor:6".

Add mousescroll documentation
 - Add option documentation in options.txt
 - Add brief summary in quickref.txt

Update :help scroll-mouse-wheel
 - Mention mousescroll option as a means of controlling scrolling.
 - Remove obsolete suggestion to map scroll wheel keys to <C-U> to
   scroll by a single line -- users should prefer the mousescroll option.
 - Add some information about the consequences of remapping scroll wheel
   keys (they lose their magic ability to affect inactive windows).

Update :help vim-differences
 - Add brief mousescroll summary under Options

Add mousescroll tests
 - Test option validation
 - Test default mousescroll value and behavior
 - Test fallback to default values
 - Test mouse vertical and horizontal scrolling in normal mode
 - Test mouse vertical and horizontal scrolling in insert mode
2022-07-06 19:34:24 +08:00
Javier Lopez
565f72b968
feat(marks): restore viewport on jump #15831
** Refactor

Previously most functions used to "get" a mark returned a position,
changed the line number and sometimes changed even the current buffer.

Now functions return a {x}fmark_T making calling context aware whether
the mark is in another buffer without arcane casting. A new function is
provided for switching to the mark buffer and returning a flag style
Enum to convey what happen in the movement. If the cursor changed, line,
columns, if it changed buffer, etc.

The function to get named mark was split into multiple functions.

- mark_get() -> fmark_T
- mark_get_global() -> xfmark_T
- mark_get_local() -> fmark_T
  - mark_get_motion() -> fmark_T
  - mark_get_visual() -> fmark_T

Functions that manage the changelist and jumplist were also modified to
return mark types.

- get_jumplist -> fmark_T
- get_changelist -> fmark_T

The refactor is also seen mainly on normal.c, where all the mark
movement has been siphoned through one function nv_gomark, while the
other functions handle getting the mark and setting their movement
flags. To handle whether context marks should be left, etc.

** Mark View

While doing the refactor the concept of a mark view was also
implemented:

The view of a mark currently implemented as the number of lines between
the mark position on creation and the window topline. This allows for
moving not only back to the position of a mark but having the window
look similar to when the mark was defined. This is done by carrying and
extra element in the fmark_T struct, which can be extended later to also
restore horizontal shift.

*** User space features

1. There's a new option, jumpoptions+=view enables the mark view restoring
automatically when using the jumplist, changelist, alternate-file and
mark motions. <C-O> <C-I> g; g, <C-^> '[mark] `[mark]

** Limitations

- The view information is not saved in shada.
- Calls to get_mark should copy the value in the pointer since we are
  using pos_to_mark() to wrap and provide a homogeneous interfaces. This
  was also a limitation in the previous state of things.
2022-06-30 05:59:52 -07:00
Christian Clason
274609a109
vim-patch:069a7d561bbe (#19130)
Update runtime files
069a7d561b
2022-06-27 23:35:26 +02:00
Christian Clason
f3c8f3e5d4
vim-patch:partial:8a3b805c6c9c (#19104)
Update runtime files
8a3b805c6c

skip builtin.txt (needs 8.2.4838)
skip message.txt (whitespace changes)
2022-06-27 10:23:09 +02:00
Enan Ajmain
0b9664f524 fix: make_filter_cmd for :! powershell #15913
Problem:
Nvim fails to create tempfile "…/nvim6UJx04/7" when 'shell' is set to
pwsh (PowerShell Core). This breaks filtered shell commands ":{range}!".
With shell set to cmd, it works.

Solution:
PowerShell doesn't use "<" for stdin redirection. Instead, use
"-RedirectStandardInput".

Closes #15913
2022-06-25 07:20:58 -07:00
Christian Clason
c00a3f45d4
vim-patch:8cc5b559f700 (#19066)
Update runtime files
8cc5b559f7
2022-06-23 15:57:51 +02:00
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
zeertzjq
d6247a575c vim-patch:8.2.5066: lcs-leadmultispace
aca12fd89b
2022-06-09 21:26:23 +08:00
Christian Clason
df4ffce543
vim-patch:partial:cfa8f9a3f285 (#18858)
Update runtime files
cfa8f9a3f2

skip syntax/vim.vim (needs 8.2.4770)
skip doc/syntax.vim (needs several colorscheme patches)
skip further rewrite of manual
2022-06-04 10:53:42 +02:00
zeertzjq
96c494dec3
refactor: correct comments and assertions about mapping rhs <Nop> (#18821)
Also avoid referring to mappings as "keymaps" in commands and docs.

						*map_empty_rhs* *map-empty-rhs*
You can create an empty {rhs} by typing nothing after a single CTRL-V (you
have to type CTRL-V two times).  Unfortunately, you cannot do this in a vimrc
file.
2022-06-01 21:37:01 +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
dundargoc
1b235fe6ca
docs(options): move all removed options to vim_diff.txt (#18770)
It's more consistent to gather all removed options in one spot rather
than spreading it out.
2022-05-28 16:42:56 +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
Gregory Anders
9e1ee9fb1d
refactor!: delete insertmode (#18547)
Neovim already removed `evim` (or any similar flags). The 'insertmode'
option is a weird remnant, so get rid of it.

The 'insertmode' option is replaced with a script that closely emulates
the option. This script is documented at :help 'insertmode'
2022-05-22 21:20:18 -06:00
dundargoc
2cab6bea09
docs: remove "Vi default" #18672
It's not relevant and clutters the documentation.
2022-05-22 04:38:59 -07:00
zeertzjq
5193b17839
vim-patch:8.2.4993: smart/C/lisp indenting is optional (#18684)
Problem:    smart/C/lisp indenting is optional, which makes the code more
            complex, while it only reduces the executable size a bit.
Solution:   Graduate FEAT_CINDENT, FEAT_SMARTINDENT and FEAT_LISP.
8e145b8246
2022-05-22 07:52:11 +08:00
Dundar Goc
97fc68850f refactor!: remove 'terse' option
Having two methods of setting the same option is redundant and can be
potentially confusing. Recommend adding 's' to 'shortmess' instead.
2022-05-19 00:15:40 +02:00
Dundar Goc
11957f51cc refactor!: remove 'remap' option
An option that should always be kept on except for when working with old
Vi scripts is of little use to us.
2022-05-19 00:15:36 +02: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
Ivan
78a1e6bc00 feat(defaults): session data in $XDG_STATE_HOME #15583
See: 4f2884e16d

- Move session persistent data to $XDG_STATE_HOME Change 'directory',
  'backupdir', 'undodir', 'viewdir' and 'shadafile' default location to
  $XDG_STATE_HOME/nvim.
- Move logs to $XDG_STATE_HOME, too.
- Add stdpath('log') support.

Fixes: #14805
2022-05-12 07:13:45 -07:00
zeertzjq
3090648584 test: revert test and doc changes from #6724, add a test for #6716
Multi-char 'pastetoggle' now works without breaking character-find.
2022-04-29 15:51:04 +08:00
Gregory Anders
2dddc86a42
fix: show autocmd output when F is in shortmess (#18251)
The default value of including F in 'shortmess' has the unfortunate side
effect of hiding output from autocommands. This is a common source of
confusion and often leads people to think their autocommands are not
working when they are. There is a small snippet in the docs for
'shortmess' indicating that the F flag suppresses autocmd output, but
it's not easy to find if you don't already know to look for it.

This commit removes that behavior of the F flag to make it only suppress
file info when opening a new file.
2022-04-25 08:44:18 -06:00
Famiu Haque
b16afe4d55 feat(highlight): implement CurSearch highlight
Adds a `CurSearch` highlight group to highlight the current search result under the cursor.
2022-04-17 19:24:59 +06:00
dundargoc
e63e5d1dbd
docs: typo fixes (#17859)
Co-authored-by: Elias Alves Moura <eliamoura.alves@gmail.com>
Co-authored-by: venkatesh <shariharanvenkatesh@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Vikas Raj <24727447+numToStr@users.noreply.github.com>
Co-authored-by: Steve Vermeulen <sfvermeulen@gmail.com>
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Co-authored-by: rwxd <rwxd@pm.me>
Co-authored-by: casswedson <58050969+casswedson@users.noreply.github.com>
2022-04-15 12:35:06 +02:00
zeertzjq
f3183a4d7c
Merge pull request #18023 from tom-anders/vim-8.2.4702
vim-patch:8.2.{4702,4703}: C++ scope labels are hard-coded
2022-04-09 22:13:34 +08:00
Tom Praschan
45f62464d3 vim-patch:8.2.4702: C++ scope labels are hard-coded
Problem:    C++ scope labels are hard-coded.
Solution:   Add 'cinscopedecls' to define the labels. (Tom Praschan,
            closes vim/vim#10109)
3506cf34c1
2022-04-09 15:39:46 +02:00
Sean Dewar
012c055804
vim-patch:partial:cbaff5e06ec5 (#18044)
Update runtime files
cbaff5e06e

Docs only.

Omit json_encode (different impl, Nvim throws E474 instead; see v8.2.4695).
Skip <MouseMove> (Nvim *kinda* has <MouseMove>, but most of this doc needs
  v8.2.4674 anyway...).
Nvim's 'hidden' doc was reworded somewhat, so manually integrate the changes
  (8331cd13c4).
Also apply "comma-separated" changes to all possible places in options.txt.
Cherry-pick *highlight-clear* tag from v8.2.3578.
2022-04-08 22:40:56 +02:00
Christian Clason
2a46600140
docs(options): add more missing 'nofoo' tags (#17967) 2022-04-02 15:24:10 +02:00
Christian Clason
e6bd9eee15
docs(options): add missing 'nofoo' tags (#17965) 2022-04-02 14:08:04 +02:00
dundargoc
ac1dd046c0
vim-patch:46eea444d (#17920)
Update runtime files
46eea444d9

Skip repeat.txt as it only has vim9-specific changes.
2022-03-30 12:12:12 +01:00
Justin M. Keyes
72652cbc46
feat(test): use nvim_exec in helpers.source() #16064
helpers.source() was a hack to work around the lack of anonymous
:source. Its "create tempfile" behavior is not a required part of most
tests that use it.

Some tests still need the old "create tempfile" behavior either because
they test SID behavior, or because of missing nvim_exec features: #16071
2022-03-27 10:25:55 -07:00
Christian Clason
75157d2572
vim-patch:47c532e2bc55 (#17780)
Update runtime files
47c532e2bc
2022-03-20 10:48:10 +01:00
bfredl
3c7e937a89
Merge pull request #17266 from famiu/feat/ui/global-statusline
feat(statusline): add global statusline
2022-03-17 20:16:39 +01:00
Famiu Haque
5ab1229174 feat: add support for global statusline
Ref: #9342

Adds the option to have a single global statusline for the current window at the bottom of the screen instead of a statusline at the bottom of every window. Enabled by setting `laststatus = 3`.

Due to the fact that statuslines at the bottom of windows are removed when global statusline is enabled, horizontal separators are used instead to separate horizontal splits. The horizontal separator character is configurable through the`horiz` item in `'fillchars'`. Separator connector characters are also used to connect the horizontal and vertical separators together, which are also configurable through the `horizup`, `horizdown`, `vertleft`, `vertright` and `verthoriz` items in `fillchars`.

The window separators are highlighted using the `WinSeparator` highlight group, which supersedes `VertSplit` and is linked to `VertSplit` by default in order to maintain backwards compatibility.
2022-03-18 00:21:41 +06:00
shadmansaleh
ebfe083337 feat(lua): show proper verbose output for lua configuration
`:verbose` didn't work properly with lua configs (For example:
    options or keymaps are set from lua, just say that they were set
    from lua, doesn't say where they were set at.

This fixes that issue. Now `:verbose` will provide filename and line no
when option/keymap is set from lua.

Changes:
  - compiles lua/vim/keymap.lua as vim/keymap.lua
 - When souring a lua file current_sctx.sc_sid is set to SID_LUA
 - Moved finding scripts SID out of `do_source()` to `get_current_script_id()`.
   So it can be reused for lua files.
 - Added new function `nlua_get_sctx` that extracts current lua scripts
   name and line no with debug library. And creates a sctx for it.
     NOTE: This function ignores C functions and blacklist which
     currently contains only vim/_meta.lua so vim.o/opt wrappers aren't
     targeted.
 - Added function `nlua_set_sctx` that changes provided sctx to current
   lua scripts sctx if a lua file is being executed.
 - Added tests in tests/functional/lua/verbose_spec.lua
 - add primary support for additional types (:autocmd, :function, :syntax) to lua verbose
    Note: These can't yet be directly set from lua but once that's possible
    :verbose should work for them hopefully :D
 - add :verbose support for nvim_exec & nvim_command within lua
    Currently auto commands/commands/functions ... can only be defined
    by nvim_exec/nvim_command this adds support for them. Means if those
    Are defined within lua with vim.cmd/nvim_exec :verbose will show their
    location . Though note it'll show the line no on which nvim_exec call was made.
2022-02-28 19:18:49 +06:00
Christian Clason
9d3370a144
vim-patch:c51cf0329809 (#17530)
Update runtime files.
c51cf03298
2022-02-27 11:56:30 +01:00
Sean Dewar
c07b5b5de6
vim-patch:partial 944697ae196 (#17493)
Update runtime files
944697ae19

Doc changes:

Include remote_*() (even though +clientserver and remote.txt isn't ported yet)
Omit screenpos() (need v8.2.4389)
Other changes are N/A or cannot be directly applied
2022-02-23 12:22:18 +00:00
zeertzjq
9b0363d365 vim-patch:8.2.1128: the write message mentions characters, but it's bytes
Problem:    The write message mentions characters, but it's actually bytes.
Solution:   Change "C" to "B" and "characters" to "bytes".
3f40ce78f5
2022-02-04 22:17:25 +08:00
zeertzjq
f4300985d3
Merge pull request #17113 from zeertzjq/vim-8.2.2569
feat(statusline): support multibyte fillchar
2022-02-01 17:57:01 +08:00
Christian Clason
79b92da0d2
vim-patch:partial:f10911e5db16 (#17248)
Update runtime files
f10911e5db
2022-01-31 15:27:01 +01:00
dundargoc
4a96e7809f
chore: typo fixes (#16921)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-01-29 23:15:22 +00:00
Björn Linse
baec0d3152 feat(provider)!: remove support for python2 and python3.[3-5]
These versions of python has reached End-of-life. getting rid
of python2 support removes a lot of logic to support two
incompatible python versions in the same version.
2022-01-29 19:49:37 +01:00
bfredl
480fbbe296
Merge pull request #17145 from zeertzjq/vim-8.2.0128
vim-patch:8.2.0128: cannot list options one per line
2022-01-27 08:37:36 +01:00
zeertzjq
aa4eadd2be vim-patch:8.2.0128: cannot list options one per line
Problem:    Cannot list options one per line.
Solution:   Use ":set!" to list one option per line.
6b915c0c0e
2022-01-20 14:34:24 +08:00
zeertzjq
be15ac06ba feat(statusline): support multibyte fillchar
This includes a partial port of Vim patch 8.2.2569 and some changes to
nvim_eval_statusline() to allow a multibyte fillchar. Literally every
line of C code touched by that patch has been refactored in Nvim, and
that patch contains some irrelevant foldcolumn tests I'm not sure how to
port (as Nvim's foldcolumn behavior has diverged from Vim's).
2022-01-16 19:54:27 +08:00