Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #11236
| Path | csiph.com!aioe.org!news.glorb.com!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Eduardo A. Bustamante López <dualbus@gmail.com> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: reverse-i-search, multibyte backspace problem |
| Date | Sat, 18 Jul 2015 20:53:52 -0500 |
| Lines | 60 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.7133.1437270842.904.bug-bash@gnu.org> (permalink) |
| References | <274381437250999@web18h.yandex.ru> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| X-Trace | usenet.stanford.edu 1437270842 8411 208.118.235.17 (19 Jul 2015 01:54:02 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| Cc | bug-bash@gnu.org |
| To | e est <mtest31@yandex.com> |
| Envelope-to | bug-bash@gnu.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=uHKTPJWEsYVrchegAFcj9evv8K72Msu3m+5lisVNuqY=; b=Zj8lvDirli+NB5Vp2VSI4zls7vLr87DMOuF1Rmw+kPnBMdji0Vtd2w68Xoxzqow19v PcmW+Ml5V9TnlFUKNMftFB8psjphuAI+fyUWpcBb7jyhEJt0NoDUuzgPozISnTyPGnSU XAUAzv17vBNElOwFCPwYcSoQ/ZoyBAu8SE2iDe8JwS3bltOo12nac/TXrQ3/XB8Dwo+m L2vhjdX4WHG9GhXn3VktQRmw2foyX61BPhoqlHQrmoAuXS5y8WuwximFVH6CWjXolyqX qH6+xLD1hc+zWUFluOkqdiJOtQ/VHopuhxAxCjFcWea8sS/I8OIADurhza4Fl+3Na/Mw 8ktA== |
| X-Received | by 10.70.41.78 with SMTP id d14mr44463305pdl.35.1437270834087; Sat, 18 Jul 2015 18:53:54 -0700 (PDT) |
| Mail-Followup-To | e est <mtest31@yandex.com>, bug-bash@gnu.org |
| Content-Disposition | inline |
| In-Reply-To | <274381437250999@web18h.yandex.ru> |
| User-Agent | Mutt/1.5.23 (2014-03-12) |
| X-detected-operating-system | by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). |
| X-Received-From | 2607:f8b0:400e:c02::234 |
| 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:11236 |
Show key headers only | View raw
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 Eduardo A. Bustamante López <dualbus@gmail.com> - 2015-07-18 20:53 -0500
csiph-web