Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #11237
| Path | csiph.com!aioe.org!news.glorb.com!usenet.stanford.edu!not-for-mail |
|---|---|
| From | e est <mtest31@yandex.com> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: reverse-i-search, multibyte backspace problem |
| Date | Sun, 19 Jul 2015 04:25:16 +0200 |
| Lines | 70 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.7134.1437272726.904.bug-bash@gnu.org> (permalink) |
| References | <274381437250999@web18h.yandex.ru> <20150719015352.GA32433@ma.sdf.org> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | quoted-printable |
| X-Trace | usenet.stanford.edu 1437272726 9778 208.118.235.17 (19 Jul 2015 02:25:26 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| Cc | "bug-bash@gnu.org" <bug-bash@gnu.org> |
| To | Eduardo A. Bustamante López <dualbus@gmail.com> |
| Envelope-to | bug-bash@gnu.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1437272717; bh=TzXF56ZigbTF3qbm1McX0Y+nTL1mQidvwhPECidOLiM=; h=From:To:Cc:In-Reply-To:References:Subject:Date; b=UCiJ97kJx8PesgVSjDhXp5H3FVoNV+QhphpEuXpLp1pCkAckXOEKEsLzacmtn3T3Z reZgkUC3+V92npUQ5hzuEvJEW38i+3Qg5o/l6a8j9BSS9YO6LtDN6o/R4OpgQUieXP FFwzmE4CHmcnGx1Ml53qtVS97jusBxEPsF+Dt3W8= |
| In-Reply-To | <20150719015352.GA32433@ma.sdf.org> |
| X-Mailer | Yamail [ http://yandex.ru ] 5.0 |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] |
| X-Received-From | 5.255.216.137 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.14 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <http://lists.gnu.org/archive/html/bug-bash> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| Xref | aioe.org gnu.bash.bug:11237 |
Show key headers only | View raw
Hello,
Thanks for pointing out the fix. I've tried the "devel" branch, and couldn't reproduce the bug there.
Sorry for the disturbance, I should have checked whether the master branch really represents the bleeding edge of development.
19.07.2015, 03:53, "Eduardo A. Bustamante López" <dualbus@gmail.com>:
> Hello,
>
> Can you please try the 'devel' branch?
>
> There's a fix for this issue already in it:
>
> | commit 947f04912e4715e7a9df526cd99412bffa729368
> | Author: Chet Ramey <chet.ramey@case.edu>
> | Date: Tue Jan 27 11:10:49 2015 -0500
> |
> | commit bash-20150116 snapshot
>
> Here's the description of the fix:
>
> | lib/readline/isearch.c
> | - _rl_isearch_dispatch: if we are in a multibyte locale, make sure to use
> | _rl_find_prev_mbchar when trying to delete characters from the search
> | string, instead of just chopping off the previous byte. Fixes bug
> | reported by Kyrylo Shpytsya <kshpitsa@gmail.com>
>
> This was reported earlier this year:
>
> http://lists.gnu.org/archive/html/bug-readline/2015-01/msg00017.html
>
> Or use this to patch:
>
> | dualbus@yaqui ...src/gnu/bash % git diff origin/master 947f04912e4715e7a9df526cd99412bffa729368 -- lib/readline/isearch.c
> | diff --git a/lib/readline/isearch.c b/lib/readline/isearch.c
> | index 6f6a7a6..d768560 100644
> | --- a/lib/readline/isearch.c
> | +++ b/lib/readline/isearch.c
> | @@ -553,8 +553,16 @@ add_character:
> | do until we have a real isearch-undo. */
> | if (cxt->search_string_index == 0)
> | rl_ding ();
> | - else
> | + else if (MB_CUR_MAX == 1 || rl_byte_oriented)
> | cxt->search_string[--cxt->search_string_index] = '\0';
> | + else
> | + {
> | + wstart = _rl_find_prev_mbchar (cxt->search_string, cxt->search_string_index, MB_FIND_NONZERO);
> | + if (wstart >= 0)
> | + cxt->search_string[cxt->search_string_index = wstart] = '\0';
> | + else
> | + rl_ding ();
> | + }
> | break;
> |
> | case -4: /* C-G, abort */
>
> Greetings!
>
> --
> Eduardo Bustamante
> https://dualbus.me/
Back to gnu.bash.bug | Previous | Next | Find similar
Re: reverse-i-search, multibyte backspace problem e est <mtest31@yandex.com> - 2015-07-19 04:25 +0200
csiph-web