summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0790
blob: aa22dade4465dd5d71f113355b2e93e4fe955742 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0790
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.0790
Problem:    Code for creating tabpages in session is too complex.
Solution:   Simplify the code. (Jason Franklin)
Files:	    src/ex_docmd.c


*** ../vim-8.1.0789/src/ex_docmd.c	2019-01-21 23:03:45.718447626 +0100
--- src/ex_docmd.c	2019-01-22 21:23:27.735578930 +0100
***************
*** 11401,11426 ****
      tab_topframe = topframe;
      if ((ssop_flags & SSOP_TABPAGES))
      {
! 	int	num_tabs;
  
! 	/*
! 	 * Similar to ses_win_rec() below, populate the tab pages first so
! 	 * later local options won't be copied to the new tabs.
! 	 */
! 	for (tabnr = 1; ; ++tabnr)
! 	{
! 	    tabpage_T *tp = find_tabpage(tabnr);
! 
! 	    if (tp == NULL)	/* done all tab pages */
! 		break;
! 
! 	    if (tabnr > 1 && put_line(fd, "tabnew") == FAIL)
  		return FAIL;
! 	}
! 
! 	num_tabs = tabnr - 1;
! 	if (num_tabs > 1 && (fprintf(fd, "tabnext -%d", num_tabs - 1) < 0
! 						       || put_eol(fd) == FAIL))
  	    return FAIL;
      }
      for (tabnr = 1; ; ++tabnr)
--- 11401,11414 ----
      tab_topframe = topframe;
      if ((ssop_flags & SSOP_TABPAGES))
      {
! 	tabpage_T *tp;
  
! 	// Similar to ses_win_rec() below, populate the tab pages first so
! 	// later local options won't be copied to the new tabs.
! 	FOR_ALL_TABPAGES(tp)
! 	    if (tp->tp_next != NULL && put_line(fd, "tabnew") == FAIL)
  		return FAIL;
! 	if (first_tabpage->tp_next != NULL && put_line(fd, "tabrewind") == FAIL)
  	    return FAIL;
      }
      for (tabnr = 1; ; ++tabnr)
*** ../vim-8.1.0789/src/version.c	2019-01-21 23:03:45.718447626 +0100
--- src/version.c	2019-01-22 21:25:49.030606634 +0100
***************
*** 793,794 ****
--- 793,796 ----
  {   /* Add new patch number below this line */
+ /**/
+     790,
  /**/

-- 
The software said it requires Windows 95 or better, so I installed Linux.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///