mirror of
https://github.com/neovim/neovim.git
synced 2025-09-25 20:48:32 +00:00
vim-patch:7.4.693 #4172
Problem: Session file is not correct when there are multiple tab pages.
Solution: Reset the current window number for each tab page. (Jacob Niehus)
695baeefe1
---
see: "[patch] wincmd error during session restore"
https://groups.google.com/d/msg/vim_dev/NykQ0UuOjXc/_MZi4sv9vp0J
What I did for testing:
```sh
mkdir /tmp/test_session
cd $_
function test_session() {
$1 -u NONE -i NONE -N ~/.vimrc \
-c 'wincmd s' \
-c 'wincmd v' \
-c 'wincmd T' \
-c 'normal 1gt' \
-c '2wincmd w' \
-c 'mks! test.vis' \
-c 'qa'
$1 -u NONE -i NONE -N -S test.vis
}
test_session vim
test_session nvim
test_session /path/to/your/neovim/repository/build/bin/nvim
```
This commit is contained in:
@@ -8368,8 +8368,7 @@ makeopens (
|
|||||||
{
|
{
|
||||||
int only_save_windows = TRUE;
|
int only_save_windows = TRUE;
|
||||||
int nr;
|
int nr;
|
||||||
int cnr = 1;
|
int restore_size = true;
|
||||||
int restore_size = TRUE;
|
|
||||||
win_T *wp;
|
win_T *wp;
|
||||||
char_u *sname;
|
char_u *sname;
|
||||||
win_T *edited_win = NULL;
|
win_T *edited_win = NULL;
|
||||||
@@ -8486,7 +8485,8 @@ makeopens (
|
|||||||
tab_firstwin = firstwin; /* first window in tab page "tabnr" */
|
tab_firstwin = firstwin; /* first window in tab page "tabnr" */
|
||||||
tab_topframe = topframe;
|
tab_topframe = topframe;
|
||||||
for (tabnr = 1;; ++tabnr) {
|
for (tabnr = 1;; ++tabnr) {
|
||||||
int need_tabnew = FALSE;
|
int need_tabnew = false;
|
||||||
|
int cnr = 1;
|
||||||
|
|
||||||
if ((ssop_flags & SSOP_TABPAGES)) {
|
if ((ssop_flags & SSOP_TABPAGES)) {
|
||||||
tabpage_T *tp = find_tabpage(tabnr);
|
tabpage_T *tp = find_tabpage(tabnr);
|
||||||
|
@@ -595,7 +595,7 @@ static int included_patches[] = {
|
|||||||
696,
|
696,
|
||||||
695,
|
695,
|
||||||
694,
|
694,
|
||||||
// 693,
|
693,
|
||||||
// 692 NA
|
// 692 NA
|
||||||
// 691 NA
|
// 691 NA
|
||||||
690,
|
690,
|
||||||
|
Reference in New Issue
Block a user