]>
Commit | Line | Data |
---|---|---|
03d4279c AM |
1 | To: vim_dev@googlegroups.com |
2 | Subject: Patch 7.3.404 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 7.3.404 | |
11 | Problem: When a complete function uses refresh "always" redo will not work | |
12 | properly. | |
13 | Solution: Do not reset compl_leader when compl_opt_refresh_always is set. | |
14 | (Yasuhiro Matsumoto) | |
15 | Files: src/edit.c | |
16 | ||
17 | ||
18 | *** ../vim-7.3.403/src/edit.c 2012-01-10 22:26:12.000000000 +0100 | |
19 | --- src/edit.c 2012-01-20 14:26:06.000000000 +0100 | |
20 | *************** | |
21 | *** 3465,3475 **** | |
22 | if (ins_compl_need_restart()) | |
23 | ins_compl_restart(); | |
24 | ||
25 | ! vim_free(compl_leader); | |
26 | ! compl_leader = vim_strnsave(ml_get_curline() + compl_col, | |
27 | (int)(curwin->w_cursor.col - compl_col)); | |
28 | ! if (compl_leader != NULL) | |
29 | ! ins_compl_new_leader(); | |
30 | } | |
31 | ||
32 | /* | |
33 | --- 3465,3481 ---- | |
34 | if (ins_compl_need_restart()) | |
35 | ins_compl_restart(); | |
36 | ||
37 | ! /* When 'always' is set, don't reset compl_leader. While completing, | |
38 | ! * cursor don't point original position, changing compl_leader would | |
39 | ! * break redo. */ | |
40 | ! if (!compl_opt_refresh_always) | |
41 | ! { | |
42 | ! vim_free(compl_leader); | |
43 | ! compl_leader = vim_strnsave(ml_get_curline() + compl_col, | |
44 | (int)(curwin->w_cursor.col - compl_col)); | |
45 | ! if (compl_leader != NULL) | |
46 | ! ins_compl_new_leader(); | |
47 | ! } | |
48 | } | |
49 | ||
50 | /* | |
51 | *************** | |
52 | *** 4554,4559 **** | |
53 | --- 4560,4570 ---- | |
54 | int found_end = FALSE; | |
55 | int advance; | |
56 | ||
57 | + /* When user complete function return -1 for findstart which is next | |
58 | + * time of 'always', compl_shown_match become NULL. */ | |
59 | + if (compl_shown_match == NULL) | |
60 | + return -1; | |
61 | + | |
62 | if (compl_leader != NULL | |
63 | && (compl_shown_match->cp_flags & ORIGINAL_TEXT) == 0) | |
64 | { | |
65 | *** ../vim-7.3.403/src/version.c 2012-01-20 13:39:03.000000000 +0100 | |
66 | --- src/version.c 2012-01-20 14:31:26.000000000 +0100 | |
67 | *************** | |
68 | *** 716,717 **** | |
69 | --- 716,719 ---- | |
70 | { /* Add new patch number below this line */ | |
71 | + /**/ | |
72 | + 404, | |
73 | /**/ | |
74 | ||
75 | -- | |
76 | ARTHUR: I've said I'm sorry about the old woman, but from the behind you | |
77 | looked ... | |
78 | DENNIS: What I object to is that you automatically treat me like an inferior... | |
79 | ARTHUR: Well ... I AM king. | |
80 | "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD | |
81 | ||
82 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
83 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
84 | \\\ an exciting new programming language -- http://www.Zimbu.org /// | |
85 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |