| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
| |
Problem:
`SessionLoadPost` also fires for views. Loading a view should not
invoke whole-session restoration.
Solution:
Only include `SessionLoadPost` in session files.
|
| |
|
|
|
|
|
|
|
|
| |
Problem:
`SessionWritePost` also fires for `:mk{view,vimrc,exrc}` without
updating `v:this_session`. Plugins appending session data can modify
a previously saved session when only a view is written.
Solution:
Emit `SessionWritePost` only for `:mksession`.
|
| |
|
|
|
|
|
|
|
| |
Problem:
`SessionWritePre` also fires for `:mk{view,vimrc,exrc}`. Single-window
saving should not invoke whole-session preparation
Solution:
Emit `SessionWritePre` only for `:mksession`
|
| |
|
|
|
|
|
|
| |
Problem: `restore_size` is scoped to all of `makeopens()`, so a window
excluded by 'sessionoptions' latches it off for every tabpage written
afterwards: with `sessionoptions-=terminal`, a terminal in tab 2 makes
tab 3 restore with `wincmd =` instead of its stored sizes.
Solution: Recompute it per tabpage.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
- buf-local CWD scope is lower priority than :lcd, which is weird.
```
win > buf > tab > global
```
- No way to clear current CWD at a given scope.
Solution:
- Rerrange scope precedence to:
```
buf > win > tab > global
```
- Introduce "bang" variants (`:bcd!`/`:lcd!`/`:tcd!`) which clears the
local CWD for the given scope.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
No way to set a buffer-local directory.
Use-cases:
- "Root dir" for LSP (and the "project" concept).
- `:terminal` OSC 7
Solution:
Add `:bcd` command.
- Extend `getcwd()` to take a third arg; `getcwd(-1, -1, bunfr)` returns
the buffer-local working directory.
- Buffer-local directories have less priority than window-local
ones, and more priority than tab-local ones.
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(#40512)
Problem: Session with multiple tabpages sets 'winminheight' to 0.
Solution: Only save 'winminheight' and 'winminwidth' once (zeertzjq).
related: vim/vim#8119
related: neovim/neovim#40493
closes: vim/vim#20673
https://github.com/vim/vim/commit/294dec827d5d6c183867bbea2971a407b297be80
|
| |
|
|
|
|
|
| |
Problem:
No event triggered just before writing a session file.
Solution:
Add `SessionWritePre`.
|
| |
|
|
|
| |
- `src/nvim/ex_cmds_defs.h`: use "U" instead of "u" per
`readability-uppercase-literal-suffix`
|
| |
|
|
|
|
|
|
| |
Problem:
vim-obsession depends on the exact string "let SessionLoad = 1" being
present in session files. https://github.com/tpope/vim-obsession/blob/ed9dfc7c2cc917ace8b24f4f9f80a91e05614b63/plugin/obsession.vim#L36-L41
Solution:
Revert cosmetic change from e12a9e7c4ea6c.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem: Not possible to know when a session will be loaded.
Solution: Add the SessionLoadPre autocommand (Colin Kennedy).
fixes: vim/vim#19084
closes: vim/vim#19306
https://github.com/vim/vim/commit/1c0d468d72e0220d4cb25936043ac35439a981b5
Co-authored-by: Colin Kennedy <colinvfx@gmail.com>
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Problem: Compiler warning for uninitialized variable.
Solution: Use another variable to decide to restore option values.
https://github.com/vim/vim/commit/b4011afe53ce2d065e49718b8c5b9974b7022f92
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
|
|
|
|
|
|
|
|
| |
Problem: More code can be moved to evalvars.c.
Solution: Move code to where it fits better. (Yegappan Lakshmanan,
closes vim/vim#4883)
https://github.com/vim/vim/commit/da6c03342117fb7f4a8110bd9e8627b612a05a64
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
file (#35968)
Problem: Code for handling v: variables in generic eval file.
Solution: Move v: variables to evalvars.c. (Yegappan Lakshmanan,
closes vim/vim#4872)
https://github.com/vim/vim/commit/e5cdf153bcb348c68011b308c8988cea42d6ddeb
Remove direct reference to "vimvars" for following functions:
- assert_error()
- get_vim_var_nr()
- get_vim_var_list()
- get_vim_var_dict()
- get_vim_var_str()
- set_cmdarg()
- set_reg_var()
- set_vcount()
- set_vexception()
- set_vthrowpoint()
- set_vim_var_bool()
- set_vim_var_dict()
- set_vim_var_list()
- set_vim_var_nr()
- set_vim_var_special()
- set_vim_var_string()
- set_vim_var_type()
Reorder functions based on v8.2.4930 for
eval_one_expr_in_str() and eval_all_expr_in_str().
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
|
|
|
|
|
|
|
| |
These are not needed after #35129 but making uncrustify still play nice
with them was a bit tricky.
Unfortunately `uncrustify --update-config-with-doc` breaks strings
with backslashes. This issue has been reported upstream,
and in the meanwhile auto-update on every single run has been disabled.
|
| |
|
|
|
|
|
|
|
|
| |
Problem: Session has wrong arglist with :tcd and :arglocal.
Solution: Also use absolute path for :argadd when there is tabpage-local
directory (zeertzjq).
related: neovim/neovim#34405
closes: vim/vim#17503
https://github.com/vim/vim/commit/a304e49790280d9e3201648eb5ec8ba1ac55b175
|
| |
|
|
|
|
|
|
|
|
| |
Problem: Unnecessary :if in session where both branches have the same
effect (after 9.1.1431).
Solution: Remove the superfluous :if (zeertzjq).
closes: vim/vim#17448
https://github.com/vim/vim/commit/8f751d56f40b8b45b6d37c73c2c1abdda18c2d4c
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Problem: Hit-Enter Prompt when loading session files
Solution: use set+= for 'shortmess' to keep the existing flags
(Miguel Barro)
closes: vim/vim#17445
https://github.com/vim/vim/commit/0ca59661966dc3e7e4ce5e266acbe1dc01dd8477
Co-authored-by: Miguel Barro <miguel.barro@live.com>
|
| | |
|
| |
|
| |
Result of `make iwyu` (after some "fixups").
|
| |
|
|
|
|
|
|
|
|
| |
"wininfo" is going to be my next victim. The main problem with wininfo
is that it is "all or nothing", i e either all state about a buffer in a
window is considered valid or none of it is. This needs to be fixed to
address some long running grievances.
For now this is just a warmup: refactor it from a linked list to a
vector.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Option metadata like list of valid values for an option and
option flags are not listed in the `options.lua` file and are instead
manually defined in C, which means option metadata is split between
several places.
Solution: Put metadata such as list of valid values for an option and
option flags in `options.lua`, and autogenerate the corresponding C
variables and enums.
Supersedes #28659
Co-authored-by: glepnir <glephunter@gmail.com>
|
| | |
|
| |
|
|
|
|
| |
Problem: Using xstrlcpy() when the exact length of the string to be
copied is known is not ideal because it requires adding 1 to
the length and an unnecessary strlen().
Solution: Add xmemcpyz() and use it in place of such xstrlcpy() calls.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Problem: No autocommand when writing session file
Solution: Add SessionWritePost autocommand
(Colin Kennedy)
fixes: vim/vim#14242
closes: vim/vim#14288
https://github.com/vim/vim/commit/e5f2280381250801a28dcff9823e6f94e7b163fc
Co-authored-by: Colin Kennedy <colinvfx@gmail.com>
|
| | |
|
| |
|
|
|
|
| |
Remove `export` pramgas from defs headers as it causes IWYU to believe
that the definitions from the defs headers comes from main header, which
is not what we really want.
|
| | |
|
| | |
|
| |
|
|
| |
Reference: https://github.com/neovim/neovim/issues/6371.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
FUNC_ATTR_* should only be used in .c files with generated headers.
Defining FUNC_ATTR_* as empty in headers causes misuses of them to be
silently ignored. Instead don't define them by default, and only define
them as empty after a .c file has included its generated header.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
- reduce variable scope
- prefer initialization over declaration and assignment
|
| |
|
|
|
|
| |
- reduce variable scope
- prefer initialization over declaration and assignment
- use bool to represent boolean values
|
| |
|
|
|
|
|
|
|
| |
Problem: Mksession mixes up "tabpages" and "curdir" arguments.
Solution: Correct logic for storing tabpage in session. (closes vim/vim#10312)
https://github.com/vim/vim/commit/d7c9564d8d24343f2e27205633032dd6ebe5232c
Co-authored-by: LemonBoy <thatlemon@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem: Cannot set a directory for a tab page.
Solution: Add the tab-local directory. (Yegappan Lakshmanan, closes vim/vim#4212)
https://github.com/vim/vim/commit/00aa069db8132851a91cfc5ca7f58ef945c75c73
Session-related changes only.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
|
|
|
|
|
| |
We already have an extensive suite of static analysis tools we use,
which causes a fair bit of redundancy as we get duplicate warnings. PVS
is also prone to give false warnings which creates a lot of work to
identify and disable.
|
| |
|
|
|
|
| |
long is 32 bits on windows, while it is 64 bits on other architectures.
This makes the type suboptimal for a codebase meant to be
cross-platform. Replace it with more appropriate integer types.
|
| |
|
|
|
|
| |
- Move vimoption_T to option.h
- option_defs.h is for option-related types
- option_vars.h corresponds to Vim's option.h
- option_defs.h and option_vars.h don't include each other
|
| | |
|