]>
Commit | Line | Data |
---|---|---|
215fbeef AG |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 7.1.325 | |
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.1.325 | |
11 | Problem: When editing a command line that's longer than available space in | |
12 | the window, the characters at the end are in reverse order. | |
13 | Solution: Increment the insert position even when the command line doesn't | |
14 | fit. (Ingo Karkat) | |
15 | Files: src/ex_getln.c | |
16 | ||
17 | ||
18 | *** ../vim-7.1.324/src/ex_getln.c Fri Jun 20 12:55:28 2008 | |
19 | --- src/ex_getln.c Fri Jun 20 16:45:55 2008 | |
20 | *************** | |
21 | *** 2053,2062 **** | |
22 | if (has_mbyte) | |
23 | correct_cmdspos(i, c); | |
24 | #endif | |
25 | ! /* If the cmdline doesn't fit, put cursor on last visible char. */ | |
26 | if ((ccline.cmdspos += c) >= m) | |
27 | { | |
28 | - ccline.cmdpos = i - 1; | |
29 | ccline.cmdspos -= c; | |
30 | break; | |
31 | } | |
32 | --- 2053,2062 ---- | |
33 | if (has_mbyte) | |
34 | correct_cmdspos(i, c); | |
35 | #endif | |
36 | ! /* If the cmdline doesn't fit, show cursor on last visible char. | |
37 | ! * Don't move the cursor itself, so we can still append. */ | |
38 | if ((ccline.cmdspos += c) >= m) | |
39 | { | |
40 | ccline.cmdspos -= c; | |
41 | break; | |
42 | } | |
43 | *************** | |
44 | *** 2829,2838 **** | |
45 | if (has_mbyte) | |
46 | correct_cmdspos(ccline.cmdpos, c); | |
47 | #endif | |
48 | ! /* Stop cursor at the end of the screen */ | |
49 | ! if (ccline.cmdspos + c >= m) | |
50 | ! break; | |
51 | ! ccline.cmdspos += c; | |
52 | #ifdef FEAT_MBYTE | |
53 | if (has_mbyte) | |
54 | { | |
55 | --- 2829,2839 ---- | |
56 | if (has_mbyte) | |
57 | correct_cmdspos(ccline.cmdpos, c); | |
58 | #endif | |
59 | ! /* Stop cursor at the end of the screen, but do increment the | |
60 | ! * insert position, so that entering a very long command | |
61 | ! * works, even though you can't see it. */ | |
62 | ! if (ccline.cmdspos + c < m) | |
63 | ! ccline.cmdspos += c; | |
64 | #ifdef FEAT_MBYTE | |
65 | if (has_mbyte) | |
66 | { | |
67 | *************** | |
68 | *** 3332,3338 **** | |
69 | /* | |
70 | * Do wildcard expansion on the string 'str'. | |
71 | * Chars that should not be expanded must be preceded with a backslash. | |
72 | ! * Return a pointer to alloced memory containing the new string. | |
73 | * Return NULL for failure. | |
74 | * | |
75 | * "orig" is the originally expanded string, copied to allocated memory. It | |
76 | --- 3333,3339 ---- | |
77 | /* | |
78 | * Do wildcard expansion on the string 'str'. | |
79 | * Chars that should not be expanded must be preceded with a backslash. | |
80 | ! * Return a pointer to allocated memory containing the new string. | |
81 | * Return NULL for failure. | |
82 | * | |
83 | * "orig" is the originally expanded string, copied to allocated memory. It | |
84 | *************** | |
85 | *** 6111,6117 **** | |
86 | ||
87 | exmode_active = save_exmode; | |
88 | ||
89 | ! /* Safety check: The old window or buffer was deleted: It's a a bug when | |
90 | * this happens! */ | |
91 | if (!win_valid(old_curwin) || !buf_valid(old_curbuf)) | |
92 | { | |
93 | --- 6112,6118 ---- | |
94 | ||
95 | exmode_active = save_exmode; | |
96 | ||
97 | ! /* Safety check: The old window or buffer was deleted: It's a bug when | |
98 | * this happens! */ | |
99 | if (!win_valid(old_curwin) || !buf_valid(old_curbuf)) | |
100 | { | |
101 | *** ../vim-7.1.324/src/version.c Fri Jun 20 18:06:15 2008 | |
102 | --- src/version.c Fri Jun 20 18:27:54 2008 | |
103 | *************** | |
104 | *** 668,669 **** | |
105 | --- 673,676 ---- | |
106 | { /* Add new patch number below this line */ | |
107 | + /**/ | |
108 | + 325, | |
109 | /**/ | |
110 | ||
111 | -- | |
112 | "I can't complain, but sometimes I still do." (Joe Walsh) | |
113 | ||
114 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
115 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
116 | \\\ download, build and distribute -- http://www.A-A-P.org /// | |
117 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |