]>
Commit | Line | Data |
---|---|---|
5ee5dc07 AM |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 7.0.012 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=ISO-8859-1 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 7.0.012 | |
11 | Problem: Using the matchparen plugin, moving the cursor in Insert mode to a | |
12 | shorter line that ends in a brace, changes the preferred column | |
13 | Solution: Use winsaveview()/winrestview() instead of getpos()/setpos(). | |
14 | Files: runtime/plugin/matchparen.vim | |
15 | ||
16 | ||
17 | *** ../vim-7.0.011/runtime/plugin/matchparen.vim Wed May 10 15:22:55 2006 | |
18 | --- runtime/plugin/matchparen.vim Thu May 11 14:42:55 2006 | |
19 | *************** | |
20 | *** 1,6 **** | |
21 | " Vim plugin for showing matching parens | |
22 | " Maintainer: Bram Moolenaar <Bram@vim.org> | |
23 | ! " Last Change: 2006 Apr 27 | |
24 | ||
25 | " Exit quickly when: | |
26 | " - this plugin was already loaded (or disabled) | |
27 | --- 1,6 ---- | |
28 | " Vim plugin for showing matching parens | |
29 | " Maintainer: Bram Moolenaar <Bram@vim.org> | |
30 | ! " Last Change: 2006 May 11 | |
31 | ||
32 | " Exit quickly when: | |
33 | " - this plugin was already loaded (or disabled) | |
34 | *************** | |
35 | *** 90,96 **** | |
36 | " Find the match. When it was just before the cursor move it there for a | |
37 | " moment. | |
38 | if before > 0 | |
39 | ! let save_cursor = getpos('.') | |
40 | call cursor(c_lnum, c_col - before) | |
41 | endif | |
42 | ||
43 | --- 90,96 ---- | |
44 | " Find the match. When it was just before the cursor move it there for a | |
45 | " moment. | |
46 | if before > 0 | |
47 | ! let save_cursor = winsaveview() | |
48 | call cursor(c_lnum, c_col - before) | |
49 | endif | |
50 | ||
51 | *************** | |
52 | *** 102,108 **** | |
53 | let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
54 | ||
55 | if before > 0 | |
56 | ! call setpos('.', save_cursor) | |
57 | endif | |
58 | ||
59 | " If a match is found setup match highlighting. | |
60 | --- 102,108 ---- | |
61 | let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
62 | ||
63 | if before > 0 | |
64 | ! call winrestview(save_cursor) | |
65 | endif | |
66 | ||
67 | " If a match is found setup match highlighting. | |
68 | *** ../vim-7.0.011/src/version.c Thu May 11 19:24:16 2006 | |
69 | --- src/version.c Thu May 11 19:29:58 2006 | |
70 | *************** | |
71 | *** 668,669 **** | |
72 | --- 668,671 ---- | |
73 | { /* Add new patch number below this line */ | |
74 | + /**/ | |
75 | + 12, | |
76 | /**/ | |
77 | ||
78 | -- | |
79 | Corduroy pillows: They're making headlines! | |
80 | ||
81 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
82 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
83 | \\\ download, build and distribute -- http://www.A-A-P.org /// | |
84 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |