[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #39091] Ctrl-U copies byte-truncated UCS-4 to the kill buffer
From: |
Josh Triplett |
Subject: |
[bug #39091] Ctrl-U copies byte-truncated UCS-4 to the kill buffer |
Date: |
Tue, 28 May 2013 04:27:06 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0 Iceweasel/20.0 |
URL:
<http://savannah.gnu.org/bugs/?39091>
Summary: Ctrl-U copies byte-truncated UCS-4 to the kill
buffer
Project: GNU GRUB
Submitted by: joshtriplett
Submitted on: Mon 27 May 2013 09:27:05 PM PDT
Category: Terminal
Severity: Major
Priority: 5 - Normal
Item Group: Software Error
Status: None
Privacy: Public
Assigned to: None
Originator Name: Josh Triplett
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release:
Release: Bazaar - trunk
Reproducibility: Every Time
Planned Release: None
_______________________________________________________
Details:
Hitting Ctrl-U deletes to the beginning of the line, but hitting Ctrl-Y
afterward yanks a truncated and mangled string. Looking at the
code (in grub-core/normal/cmdline.c), it looks like the implementation
of Ctrl-U never got converted from 8-bit characters to UCS-4, so it only
copies N bytes rather than N characters. The attached patch fixes this
problem.
Changelog entry for this patch:
2013-05-27 Josh Triplett <address@hidden>
* grub-core/normal/cmdline.c (grub_cmdline_get): Fix Ctrl-u
handling to copy the killed characters to the kill buffer as
UCS4 stored as grub_uint32_t rather than as 8-bit characters
stored as char. Eliminates UCS4 truncation and corruption
observed when killing characters with Ctrl-u and yanking them
back with Ctrl-y.
I've also attached the patch in "bzr send" form for direct application,
including the changelog entry.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mon 27 May 2013 09:27:06 PM PDT Name: grub-ctrl-u-ucs4.patch Size:
599B By: joshtriplett
Patch in standard patch form and in "bzr send" form.
<http://savannah.gnu.org/bugs/download.php?file_id=28191>
-------------------------------------------------------
Date: Mon 27 May 2013 09:27:06 PM PDT Name: grub-ctrl-u-ucs4.bzr Size: 3kB
By: joshtriplett
Patch in standard patch form and in "bzr send" form.
<http://savannah.gnu.org/bugs/download.php?file_id=28192>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?39091>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #39091] Ctrl-U copies byte-truncated UCS-4 to the kill buffer,
Josh Triplett <=