]>
Commit | Line | Data |
---|---|---|
e5ec3c9c ER |
1 | BASH PATCH REPORT |
2 | ================= | |
3 | ||
4 | Bash-Release: 4.2 | |
5 | Patch-ID: bash42-037 | |
6 | ||
7 | Bug-Reported-by: Jakub Filak | |
8 | Bug-Reference-ID: | |
9 | Bug-Reference-URL: https://bugzilla.redhat.com/show_bug.cgi?id=813289 | |
10 | ||
11 | Bug-Description: | |
12 | ||
13 | Attempting to redo (using `.') the vi editing mode `cc', `dd', or `yy' | |
14 | commands leads to an infinite loop. | |
15 | ||
16 | Patch (apply with `patch -p0'): | |
17 | ||
18 | *** ../bash-4.2-patched/lib/readline/vi_mode.c 2011-02-25 11:17:02.000000000 -0500 | |
19 | --- lib/readline/vi_mode.c 2012-06-02 12:24:47.000000000 -0400 | |
20 | *************** | |
21 | *** 1235,1243 **** | |
22 | r = rl_domove_motion_callback (_rl_vimvcxt); | |
23 | } | |
24 | ! else if (vi_redoing) | |
25 | { | |
26 | _rl_vimvcxt->motion = _rl_vi_last_motion; | |
27 | r = rl_domove_motion_callback (_rl_vimvcxt); | |
28 | } | |
29 | #if defined (READLINE_CALLBACKS) | |
30 | else if (RL_ISSTATE (RL_STATE_CALLBACK)) | |
31 | --- 1297,1313 ---- | |
32 | r = rl_domove_motion_callback (_rl_vimvcxt); | |
33 | } | |
34 | ! else if (vi_redoing && _rl_vi_last_motion != 'd') /* `dd' is special */ | |
35 | { | |
36 | _rl_vimvcxt->motion = _rl_vi_last_motion; | |
37 | r = rl_domove_motion_callback (_rl_vimvcxt); | |
38 | } | |
39 | + else if (vi_redoing) /* handle redoing `dd' here */ | |
40 | + { | |
41 | + _rl_vimvcxt->motion = _rl_vi_last_motion; | |
42 | + rl_mark = rl_end; | |
43 | + rl_beg_of_line (1, key); | |
44 | + RL_UNSETSTATE (RL_STATE_VIMOTION); | |
45 | + r = vidomove_dispatch (_rl_vimvcxt); | |
46 | + } | |
47 | #if defined (READLINE_CALLBACKS) | |
48 | else if (RL_ISSTATE (RL_STATE_CALLBACK)) | |
49 | *************** | |
50 | *** 1317,1325 **** | |
51 | r = rl_domove_motion_callback (_rl_vimvcxt); | |
52 | } | |
53 | ! else if (vi_redoing) | |
54 | { | |
55 | _rl_vimvcxt->motion = _rl_vi_last_motion; | |
56 | r = rl_domove_motion_callback (_rl_vimvcxt); | |
57 | } | |
58 | #if defined (READLINE_CALLBACKS) | |
59 | else if (RL_ISSTATE (RL_STATE_CALLBACK)) | |
60 | --- 1387,1403 ---- | |
61 | r = rl_domove_motion_callback (_rl_vimvcxt); | |
62 | } | |
63 | ! else if (vi_redoing && _rl_vi_last_motion != 'c') /* `cc' is special */ | |
64 | { | |
65 | _rl_vimvcxt->motion = _rl_vi_last_motion; | |
66 | r = rl_domove_motion_callback (_rl_vimvcxt); | |
67 | } | |
68 | + else if (vi_redoing) /* handle redoing `cc' here */ | |
69 | + { | |
70 | + _rl_vimvcxt->motion = _rl_vi_last_motion; | |
71 | + rl_mark = rl_end; | |
72 | + rl_beg_of_line (1, key); | |
73 | + RL_UNSETSTATE (RL_STATE_VIMOTION); | |
74 | + r = vidomove_dispatch (_rl_vimvcxt); | |
75 | + } | |
76 | #if defined (READLINE_CALLBACKS) | |
77 | else if (RL_ISSTATE (RL_STATE_CALLBACK)) | |
78 | *************** | |
79 | *** 1378,1381 **** | |
80 | --- 1456,1472 ---- | |
81 | r = rl_domove_motion_callback (_rl_vimvcxt); | |
82 | } | |
83 | + else if (vi_redoing && _rl_vi_last_motion != 'y') /* `yy' is special */ | |
84 | + { | |
85 | + _rl_vimvcxt->motion = _rl_vi_last_motion; | |
86 | + r = rl_domove_motion_callback (_rl_vimvcxt); | |
87 | + } | |
88 | + else if (vi_redoing) /* handle redoing `yy' here */ | |
89 | + { | |
90 | + _rl_vimvcxt->motion = _rl_vi_last_motion; | |
91 | + rl_mark = rl_end; | |
92 | + rl_beg_of_line (1, key); | |
93 | + RL_UNSETSTATE (RL_STATE_VIMOTION); | |
94 | + r = vidomove_dispatch (_rl_vimvcxt); | |
95 | + } | |
96 | #if defined (READLINE_CALLBACKS) | |
97 | else if (RL_ISSTATE (RL_STATE_CALLBACK)) | |
98 | *** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 | |
99 | --- patchlevel.h Thu Feb 24 21:41:34 2011 | |
100 | *************** | |
101 | *** 26,30 **** | |
102 | looks for to find the patch level (for the sccs version string). */ | |
103 | ||
104 | ! #define PATCHLEVEL 36 | |
105 | ||
106 | #endif /* _PATCHLEVEL_H_ */ | |
107 | --- 26,30 ---- | |
108 | looks for to find the patch level (for the sccs version string). */ | |
109 | ||
110 | ! #define PATCHLEVEL 37 | |
111 | ||
112 | #endif /* _PATCHLEVEL_H_ */ |