[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bracketed-paste-mode and gdb
From: |
Chet Ramey |
Subject: |
Re: bracketed-paste-mode and gdb |
Date: |
Wed, 16 Feb 2022 09:46:09 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 |
On 2/15/22 12:21 PM, Andrew Burgess wrote:
> I've tried two things, neither seem to quite work, as I don't think I
> quite have all the information that I need. I have a rough readline
> patch below which I think solves the issue, but I'd like to explain
> what I've tried so far, I'm hoping there might be a solution that
> doesn't involve changing readline.
>
> My first thought was that I could use rl_deprep_term_function,
> something like:
>
> rl_deprep_term_function = gdb_rl_deprep_term_function;
>
> void
> gdb_rl_deprep_term_function ()
> {
> if (/* Did we just receive eof? */)
> printf ("quit\n");
> rl_deprep_terminal ();
> }
>
> Obviously, I'm struggling with what the if condition should be.
You can test your hypothesis by temporarily using _rl_eof_found as the
`if' condition.
I imagine it will work. If it does, we can either add a new state, like
your patch proposes, or change the previously-private variable to a
public one by removing the leading underscore.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/