mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-31 16:57:10 +00:00
This commit was generated by cvs2svn to compensate for changes in r30971,
which included commits to RCS files with non-trunk default branches.
This commit is contained in:
commit
dc25b435e9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=30972
@ -1482,7 +1482,7 @@ cr ()
|
|||||||
void
|
void
|
||||||
_rl_redisplay_after_sigwinch ()
|
_rl_redisplay_after_sigwinch ()
|
||||||
{
|
{
|
||||||
char *t, *oldp;
|
char *t, *oldp, *oldl, *oldlprefix;
|
||||||
|
|
||||||
/* Clear the current line and put the cursor at column 0. Make sure
|
/* Clear the current line and put the cursor at column 0. Make sure
|
||||||
the right thing happens if we have wrapped to a new screen line. */
|
the right thing happens if we have wrapped to a new screen line. */
|
||||||
@ -1508,9 +1508,14 @@ _rl_redisplay_after_sigwinch ()
|
|||||||
if (t)
|
if (t)
|
||||||
{
|
{
|
||||||
oldp = rl_display_prompt;
|
oldp = rl_display_prompt;
|
||||||
|
oldl = local_prompt;
|
||||||
|
oldlprefix = local_prompt_prefix;
|
||||||
rl_display_prompt = ++t;
|
rl_display_prompt = ++t;
|
||||||
|
local_prompt = local_prompt_prefix = (char *)NULL;
|
||||||
rl_forced_update_display ();
|
rl_forced_update_display ();
|
||||||
rl_display_prompt = oldp;
|
rl_display_prompt = oldp;
|
||||||
|
local_prompt = oldl;
|
||||||
|
local_prompt_prefix = oldlprefix;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
rl_forced_update_display ();
|
rl_forced_update_display ();
|
||||||
|
@ -246,7 +246,7 @@ history_truncate_file (fname, lines)
|
|||||||
|
|
||||||
/* Write only if there are more lines in the file than we want to
|
/* Write only if there are more lines in the file than we want to
|
||||||
truncate to. */
|
truncate to. */
|
||||||
if (i && ((file = open (filename, O_WRONLY|O_TRUNC|O_BINARY, 0666)) != -1))
|
if (i && ((file = open (filename, O_WRONLY|O_TRUNC|O_BINARY, 0600)) != -1))
|
||||||
{
|
{
|
||||||
write (file, buffer + i, finfo.st_size - i);
|
write (file, buffer + i, finfo.st_size - i);
|
||||||
close (file);
|
close (file);
|
||||||
@ -275,7 +275,7 @@ history_do_write (filename, nelements, overwrite)
|
|||||||
mode = overwrite ? O_WRONLY|O_CREAT|O_TRUNC|O_BINARY : O_WRONLY|O_APPEND|O_BINARY;
|
mode = overwrite ? O_WRONLY|O_CREAT|O_TRUNC|O_BINARY : O_WRONLY|O_APPEND|O_BINARY;
|
||||||
output = history_filename (filename);
|
output = history_filename (filename);
|
||||||
|
|
||||||
if ((file = open (output, mode, 0666)) == -1)
|
if ((file = open (output, mode, 0600)) == -1)
|
||||||
{
|
{
|
||||||
FREE (output);
|
FREE (output);
|
||||||
return (errno);
|
return (errno);
|
||||||
|
@ -262,7 +262,7 @@ rl_search_history (direction, invoking_key)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c >= 0 && (CTRL_CHAR (c) || META_CHAR (c) || c == RUBOUT))
|
if (c >= 0 && (CTRL_CHAR (c) || META_CHAR (c) || c == RUBOUT) && c != CTRL ('g'))
|
||||||
{
|
{
|
||||||
rl_execute_next (c);
|
rl_execute_next (c);
|
||||||
break;
|
break;
|
||||||
|
@ -189,7 +189,7 @@ tilde_expand (string)
|
|||||||
if (result = strchr (string, '~'))
|
if (result = strchr (string, '~'))
|
||||||
result = xmalloc (result_size = (strlen (string) + 16));
|
result = xmalloc (result_size = (strlen (string) + 16));
|
||||||
else
|
else
|
||||||
result = xmalloc (result_size = strlen (string));
|
result = xmalloc (result_size = (strlen (string) + 1));
|
||||||
|
|
||||||
/* Scan through STRING expanding tildes as we come to them. */
|
/* Scan through STRING expanding tildes as we come to them. */
|
||||||
while (1)
|
while (1)
|
||||||
|
Loading…
Reference in New Issue
Block a user