mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-17 13:10:12 +08:00
* histfile.c (read_history_range): Remove '\r' character from
history lines.
This commit is contained in:
parent
3e94bf1a01
commit
a75b402ae4
@ -1,3 +1,8 @@
|
||||
2006-03-21 Denis Pilat <denis.pilat@st.com>
|
||||
|
||||
* histfile.c (read_history_range): Remove '\r' character from
|
||||
history lines.
|
||||
|
||||
2005-02-10 Denis Pilat <denis.pilat@st.com>
|
||||
|
||||
* readline/terminal.c (_rl_get_screen_size): Get console size from
|
||||
|
@ -228,7 +228,10 @@ read_history_range (filename, from, to)
|
||||
for (line_end = line_start; line_end < bufend; line_end++)
|
||||
if (*line_end == '\n')
|
||||
{
|
||||
*line_end = '\0';
|
||||
if (line_end - 1 >= line_start && *(line_end - 1) == '\r')
|
||||
*(line_end - 1) = '\0';
|
||||
else
|
||||
*line_end = '\0';
|
||||
|
||||
if (*line_start)
|
||||
add_history (line_start);
|
||||
|
Loading…
Reference in New Issue
Block a user