[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] ^W and ^\ behaves differently on BACKWARDS_SEARCH
From: |
Benno Schulenberg |
Subject: |
Re: [Nano-devel] ^W and ^\ behaves differently on BACKWARDS_SEARCH |
Date: |
Thu, 12 Apr 2018 20:46:44 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
Op 12-04-18 om 13:38 schreef Liu Hao:
> I have noticed that now ^W always starts a forward search by calling the
> `do_search_forward()` function in 'src/search.c', which clears the
> `BACKWARDS_SEARCH` flag. This is, however, not the case on ^\, which
> honors the current status of this flag, which could be altered
> accidentally by ^Q or M-Up. Sometimes I get confused by the
> 'out-of-thin-air' backwards replacing flag.
>
> I think the behavior of these function should match in this case,
Hmmm... But we don't have a key to start a backwards replacing session.
And it is kind of strange that the Case-Sensitive and Regular-Expression
flags are persistent but the Backwards flag is volatile...
But I agree: it should be easily predictable in what direction a replacing
session will go. The ^W, ^Q, Alt-Up and Alt-Down keystrokes set the
backwards flag as a kind of "side effect" -- the user does not toggle the
flag herself -- so it's somewhat hard to know/remember for which direction
the flag is set. So... I've applied and pushed your patch: bb394990.
Thanks for the patch.
Benno
signature.asc
Description: OpenPGP digital signature