aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_session.c
Commit message (Collapse)AuthorAge
* fix(session): limit `SessionLoadPost` to sessions #41878Barrett Ruth2026-09-12
| | | | | | | | Problem: `SessionLoadPost` also fires for views. Loading a view should not invoke whole-session restoration. Solution: Only include `SessionLoadPost` in session files.
* fix(session): limit `SessionWritePost` to `:mksession`Barrett Ruth2026-09-12
| | | | | | | | | | 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`.
* fix(session): limit `SessionWritePre` to `:mksession`Barrett Ruth2026-09-12
| | | | | | | | | Problem: `SessionWritePre` also fires for `:mk{view,vimrc,exrc}`. Single-window saving should not invoke whole-session preparation Solution: Emit `SessionWritePre` only for `:mksession`
* fix(session): window sizes lost in tabpages after an excluded window #41478Barrett Ruth2026-08-27
| | | | | | | | 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.
* feat(cwd)!: :lcd! (bang), rearrange :bcd/:lcd/… scope precedence #41194Justin M. Keyes2026-08-07
| | | | | | | | | | | | | | | | 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.
* refactor(editor): cleanup change-directory (:bcd) logicJustin M. Keyes2026-08-04
|
* feat(editor): `:bcd` changes buffer-local directorysaher2026-08-04
| | | | | | | | | | | | | | | | | | 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>
* refactor(search): SearchStateJustin M. Keyes2026-07-16
|
* refactor(globals): group search state into SearchState structcarladams1299-lab2026-07-16
|
* vim-patch:9.2.0756: Session with multiple tabpages sets 'winminheight' to 0 ↵zeertzjq2026-07-01
| | | | | | | | | | | | (#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
* feat(events): :mksession SessionWritePre event #39688Igor Lacerda2026-06-14
| | | | | | | Problem: No event triggered just before writing a session file. Solution: Add `SessionWritePre`.
* build: update clang v21, fix warningsdundargoc2026-04-14
| | | | | - `src/nvim/ex_cmds_defs.h`: use "U" instead of "u" per `readability-uppercase-literal-suffix`
* fix(session): spacebar heater not warm enough #38434Justin M. Keyes2026-03-23
| | | | | | | | 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.
* docs: starting.txt new layoutJustin M. Keyes2026-03-22
|
* vim-patch:9.2.0061: Not possible to know when a session will be loaded (#38071)zeertzjq2026-02-26
| | | | | | | | | | | 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>
* fix(session): window sizes not stored with float windows (#37344)zeertzjq2026-01-10
|
* vim-patch:8.2.4851: compiler warning for uninitialized variableJan Edmund Lazo2025-10-11
| | | | | | | | | 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>
* vim-patch:8.1.1957: more code can be moved to evalvars.cJan Edmund Lazo2025-10-05
| | | | | | | | | | 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>
* vim-patch:partial:8.1.1939: code for handling v: variables in generic eval ↵Jan Edmund Lazo2025-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* refactor(build): remove INCLUDE_GENERATED_DECLARATIONS guardsbfredl2025-08-14
| | | | | | | | | 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.
* vim-patch:9.1.1450: Session has wrong arglist with :tcd and :arglocal (#34430)zeertzjq2025-06-10
| | | | | | | | | | 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
* vim-patch:9.1.1433: Unnecessary :if when writing sessionzeertzjq2025-06-06
| | | | | | | | | | 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
* vim-patch:9.1.1431: Hit-Enter Prompt when loading session fileszeertzjq2025-06-06
| | | | | | | | | | | | 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>
* refactor(ui): separate types for allocated grids and viewportsbfredl2025-04-28
|
* refactor: iwyu #31637Justin M. Keyes2024-12-23
| | | Result of `make iwyu` (after some "fixups").
* refactor(wininfo): change wininfo from a linked list to an arraybfredl2024-12-16
| | | | | | | | | | "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.
* refactor(options): autogenerate valid values and flag enums for options (#31089)Famiu Haque2024-11-23
| | | | | | | | | | | | | | 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>
* refactor: move shared messages to errors.h #26214Justin M. Keyes2024-06-01
|
* refactor: add xmemcpyz() and use it in place of some xstrlcpy() (#28422)zeertzjq2024-04-20
| | | | | | 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.
* vim-patch:9.1.0207: No autocommand when writing session file (#28048)zeertzjq2024-03-27
| | | | | | | | | | | | 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>
* fix(coverity/348240): memory leak in put_view()Daniil Zhukov2024-01-26
|
* refactor(IWYU): fix headersdundargoc2024-01-11
| | | | | | 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.
* refactor: follow style guidedundargoc2023-12-30
|
* refactor(IWYU): move evalarg_T to eval_defs.h (#26716)zeertzjq2023-12-23
|
* refactor: run IWYU on entire repodundargoc2023-12-21
| | | | Reference: https://github.com/neovim/neovim/issues/6371.
* refactor: eliminate cyclic includesdundargoc2023-12-20
|
* refactor: use `bool` to represent boolean valuesdundargoc2023-12-19
|
* build: don't define FUNC_ATTR_* as empty in headers (#26317)zeertzjq2023-11-30
| | | | | | 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.
* refactor: fix headers with IWYUdundargoc2023-11-28
|
* build(IWYU): fix includes for undo_defs.hdundargoc2023-11-27
|
* build(IWYU): fix includes for func_attr.hdundargoc2023-11-27
|
* build(IWYU): replace most private mappings with pragmas (#26247)zeertzjq2023-11-27
|
* refactor: follow style guidedundargoc2023-11-19
| | | | | - reduce variable scope - prefer initialization over declaration and assignment
* refactor: follow style guidedundargoc2023-11-13
| | | | | | - reduce variable scope - prefer initialization over declaration and assignment - use bool to represent boolean values
* vim-patch:8.2.4850: mksession mixes up "tabpages" and "curdir" argumentszeertzjq2023-11-13
| | | | | | | | | 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>
* vim-patch:partial:8.1.1218: cannot set a directory for a tab pagezeertzjq2023-11-13
| | | | | | | | | | | 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>
* build: remove PVSdundargoc2023-11-12
| | | | | | | 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.
* refactor: the long goodbyedundargoc2023-11-05
| | | | | | 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.
* refactor: reorganize option header files (#25437)zeertzjq2023-09-30
| | | | | | - 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
* build(iwyu): add a few more _defs.h mappings (#25435)zeertzjq2023-09-30
|