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: j...@joshtriplett.org 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 <j...@joshtriplett.org> * 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-grub mailing list Bug-grub@gnu.org https://lists.gnu.org/mailman/listinfo/bug-grub