summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0734
blob: 62dd90f2761a7dbf13e1d69c95188c999289b8d1 (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.0734
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.0734
Problem:    The hlsearch state is not stored in a session file.
Solution:   Add "nohlsearch" if appropriate. (Jason Franklin)
Files:	    src/ex_docmd.c, src/testdir/test_mksession.vim


*** ../vim-8.1.0733/src/ex_docmd.c	2019-01-08 22:02:36.044297306 +0100
--- src/ex_docmd.c	2019-01-12 16:26:37.281066688 +0100
***************
*** 10144,10149 ****
--- 10144,10153 ----
  	    if (put_line(fd, "let &so = s:so_save | let &siso = s:siso_save")
  								      == FAIL)
  		failed = TRUE;
+ # ifdef FEAT_SEARCH_EXTRA
+ 	    if (no_hlsearch && put_line(fd, "nohlsearch") == FAIL)
+ 		failed = TRUE;
+ # endif
  	    if (put_line(fd, "doautoall SessionLoadPost") == FAIL)
  		failed = TRUE;
  	    if (eap->cmdidx == CMD_mksession)
*** ../vim-8.1.0733/src/testdir/test_mksession.vim	2018-08-30 14:15:56.858667449 +0200
--- src/testdir/test_mksession.vim	2019-01-12 16:24:14.553959907 +0100
***************
*** 198,203 ****
--- 198,221 ----
    call delete('Xtest_mks.out')
  endfunc
  
+ if has('extra_search')
+ 
+ func Test_mksession_hlsearch()
+   set hlsearch
+   mksession! Xtest_mks.out
+   nohlsearch
+   source Xtest_mks.out
+   call assert_equal(1, v:hlsearch, 'session should restore search highlighting state')
+   nohlsearch
+   mksession! Xtest_mks.out
+   source Xtest_mks.out
+   call assert_equal(0, v:hlsearch, 'session should restore search highlighting state')
+   call delete('Xtest_mks.out')
+ endfunc
+ 
+ endif
+ 
+ 
  func Test_mksession_blank_windows()
    split
    split
*** ../vim-8.1.0733/src/version.c	2019-01-12 16:10:47.415360504 +0100
--- src/version.c	2019-01-12 16:27:53.592581589 +0100
***************
*** 797,798 ****
--- 797,800 ----
  {   /* Add new patch number below this line */
+ /**/
+     734,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
174. You know what a listserv is.

 /// 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    ///