mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-09 13:10:50 +02:00
Bash-5.3-alpha release
This commit is contained in:
+18
-3
@@ -1,6 +1,6 @@
|
||||
/* callback.c -- functions to use readline as an X `callback' mechanism. */
|
||||
|
||||
/* Copyright (C) 1987-2022 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1987-2024 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU Readline Library (Readline), a library
|
||||
for reading lines of text with interactive input and history editing.
|
||||
@@ -115,7 +115,10 @@ rl_callback_handler_install (const char *prompt, rl_vcpfunc_t *linefunc)
|
||||
#define CALLBACK_READ_RETURN() \
|
||||
do { \
|
||||
if (rl_persistent_signal_handlers == 0) \
|
||||
rl_clear_signals (); \
|
||||
{ \
|
||||
rl_clear_signals (); \
|
||||
if (_rl_caught_signal) _rl_signal_handler (_rl_caught_signal); \
|
||||
} \
|
||||
return; \
|
||||
} while (0)
|
||||
#else
|
||||
@@ -320,6 +323,15 @@ rl_callback_handler_remove (void)
|
||||
rl_linefunc = NULL;
|
||||
RL_UNSETSTATE (RL_STATE_CALLBACK);
|
||||
RL_CHECK_SIGNALS ();
|
||||
|
||||
/* Do what we need to do to manage the undo list if we haven't already done
|
||||
it in rl_callback_read_char(). If there's no undo list, we don't need to
|
||||
do anything. It doesn't matter if we try to revert all previous lines a
|
||||
second time; none of the history entries will have an undo list. */
|
||||
if (rl_undo_list)
|
||||
readline_common_teardown ();
|
||||
/* At this point, rl_undo_list == NULL. */
|
||||
|
||||
if (in_handler)
|
||||
{
|
||||
in_handler = 0;
|
||||
@@ -360,7 +372,7 @@ rl_callback_sigcleanup (void)
|
||||
if (RL_ISSTATE (RL_STATE_ISEARCH))
|
||||
_rl_isearch_cleanup (_rl_iscxt, 0);
|
||||
else if (RL_ISSTATE (RL_STATE_NSEARCH))
|
||||
_rl_nsearch_cleanup (_rl_nscxt, 0);
|
||||
_rl_nsearch_sigcleanup (_rl_nscxt, 0);
|
||||
else if (RL_ISSTATE (RL_STATE_VIMOTION))
|
||||
RL_UNSETSTATE (RL_STATE_VIMOTION);
|
||||
else if (RL_ISSTATE (RL_STATE_NUMERICARG))
|
||||
@@ -370,6 +382,9 @@ rl_callback_sigcleanup (void)
|
||||
}
|
||||
else if (RL_ISSTATE (RL_STATE_MULTIKEY))
|
||||
RL_UNSETSTATE (RL_STATE_MULTIKEY);
|
||||
else if (RL_ISSTATE (RL_STATE_READSTR))
|
||||
_rl_readstr_sigcleanup (_rl_rscxt, 0);
|
||||
|
||||
if (RL_ISSTATE (RL_STATE_CHARSEARCH))
|
||||
RL_UNSETSTATE (RL_STATE_CHARSEARCH);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user