source: patches/readline-6.0-branch_update-1.patch@ bfc344f

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since bfc344f was 613a326, checked in by Jim Gifford <clfs@…>, 16 years ago

Added Readline Branch Update Patch

  • Property mode set to 100644
File size: 3.5 KB
RevLine 
[613a326]1Submitted By: Jim Gifford (jim at cross-lfs dot org)
2Date: 06-05-2009
3Initial Package Version: 6.0
4Origin: Upstream
5Upstream Status: Applied
6Description: Contains all upstream patches up to 6.0-003
7
8diff -Naur readline-6.0.orig/display.c readline-6.0/display.c
9--- readline-6.0.orig/display.c 2009-01-04 11:32:32.000000000 -0800
10+++ readline-6.0/display.c 2009-06-05 14:07:00.000000000 -0700
11@@ -512,6 +512,7 @@
12 /* Block keyboard interrupts because this function manipulates global
13 data structures. */
14 _rl_block_sigint ();
15+ RL_SETSTATE (RL_STATE_REDISPLAYING);
16
17 if (!rl_display_prompt)
18 rl_display_prompt = "";
19@@ -1236,6 +1237,7 @@
20 visible_wrap_offset = wrap_offset;
21 }
22
23+ RL_UNSETSTATE (RL_STATE_REDISPLAYING);
24 _rl_release_sigint ();
25 }
26
27@@ -1772,7 +1774,7 @@
28 space_to_eol will insert too many spaces. XXX - maybe we should
29 adjust col_lendiff based on the difference between _rl_last_c_pos
30 and _rl_screenwidth */
31- if (col_lendiff && (_rl_last_c_pos < _rl_screenwidth))
32+ if (col_lendiff && ((MB_CUR_MAX == 1 || rl_byte_oriented) || (_rl_last_c_pos < _rl_screenwidth)))
33 #endif
34 {
35 if (_rl_term_autowrap && current_line < inv_botlin)
36@@ -1892,6 +1894,10 @@
37
38 woff = WRAP_OFFSET (_rl_last_v_pos, wrap_offset);
39 cpos = _rl_last_c_pos;
40+
41+ if (cpos == 0 && cpos == new)
42+ return;
43+
44 #if defined (HANDLE_MULTIBYTE)
45 /* If we have multibyte characters, NEW is indexed by the buffer point in
46 a multibyte string, but _rl_last_c_pos is the display position. In
47@@ -1905,9 +1911,9 @@
48 prompt string, since they're both buffer indices and DPOS is a
49 desired display position. */
50 if ((new > prompt_last_invisible) || /* XXX - don't use woff here */
51- (prompt_physical_chars > _rl_screenwidth &&
52+ (prompt_physical_chars >= _rl_screenwidth &&
53 _rl_last_v_pos == prompt_last_screen_line &&
54- wrap_offset >= woff &&
55+ wrap_offset >= woff && dpos >= woff &&
56 new > (prompt_last_invisible-(_rl_screenwidth*_rl_last_v_pos)-wrap_offset)))
57 /* XXX last comparison might need to be >= */
58 {
59diff -Naur readline-6.0.orig/patchlevel readline-6.0/patchlevel
60--- readline-6.0.orig/patchlevel 2008-11-18 08:01:14.000000000 -0800
61+++ readline-6.0/patchlevel 2009-06-05 14:07:00.000000000 -0700
62@@ -1,3 +1,3 @@
63 # Do not edit -- exists only for use by patch
64
65-0
66+3
67diff -Naur readline-6.0.orig/readline.h readline-6.0/readline.h
68--- readline-6.0.orig/readline.h 2009-01-04 11:32:33.000000000 -0800
69+++ readline-6.0/readline.h 2009-06-05 14:06:57.000000000 -0700
70@@ -814,8 +814,9 @@
71 #define RL_STATE_VIMOTION 0x100000 /* reading vi motion arg */
72 #define RL_STATE_MULTIKEY 0x200000 /* reading multiple-key command */
73 #define RL_STATE_VICMDONCE 0x400000 /* entered vi command mode at least once */
74+#define RL_STATE_REDISPLAYING 0x800000 /* updating terminal display */
75
76-#define RL_STATE_DONE 0x800000 /* done; accepted line */
77+#define RL_STATE_DONE 0x1000000 /* done; accepted line */
78
79 #define RL_SETSTATE(x) (rl_readline_state |= (x))
80 #define RL_UNSETSTATE(x) (rl_readline_state &= ~(x))
81diff -Naur readline-6.0.orig/terminal.c readline-6.0/terminal.c
82--- readline-6.0.orig/terminal.c 2009-01-04 11:32:34.000000000 -0800
83+++ readline-6.0/terminal.c 2009-06-05 14:06:57.000000000 -0700
84@@ -355,7 +355,7 @@
85 _rl_get_screen_size (fileno (rl_instream), 1);
86 if (CUSTOM_REDISPLAY_FUNC ())
87 rl_forced_update_display ();
88- else
89+ else if (RL_ISSTATE(RL_STATE_REDISPLAYING) == 0)
90 _rl_redisplay_after_sigwinch ();
91 }
92 }
Note: See TracBrowser for help on using the repository browser.