779 break; |
779 break; |
780 |
780 |
781 case 'U' - 'A' + 1: // readline ^U - delete from start to cursor |
781 case 'U' - 'A' + 1: // readline ^U - delete from start to cursor |
782 if (g_cursor > 0) |
782 if (g_cursor > 0) |
783 { |
783 { |
784 interface_yank_and_delete (0, g_cursor); |
784 yank (0, g_cursor); |
785 g_cursor = 0; |
785 g_cursor = 0; |
786 } |
786 } |
787 break; |
787 break; |
788 |
788 |
789 case 'K' - 'A' + 1: // readline ^K - delete from cursor to end |
789 case 'K' - 'A' + 1: // readline ^K - delete from cursor to end |
790 interface_yank_and_delete (g_cursor, mutable_current_input().length()); |
790 yank (g_cursor, mutable_current_input().length()); |
791 break; |
791 break; |
792 |
792 |
793 case 'W' - 'A' + 1: // readline ^W - delete from previous word bounary to current |
793 case 'W' - 'A' + 1: // readline ^W - delete from previous word bounary to current |
794 interface_yank_and_delete (interface_find_previous_word(), g_cursor); |
794 yank (interface_find_previous_word(), g_cursor); |
795 break; |
795 break; |
796 |
796 |
797 case 'Y' - 'A' + 1: // readline ^Y - paste previously deleted text |
797 case 'Y' - 'A' + 1: // readline ^Y - paste previously deleted text |
798 if (not g_pasteBuffer.is_empty()) |
798 if (not g_pasteBuffer.is_empty()) |
799 { |
799 { |