I am sorry that I am (once again) the late in posting my report, but I wanted to birth this massive commit first :D
These past (very long) two weeks I have been working almost exclusively on a patch of epic proportions. What started out as a simple fix to get cut working properly quickly blossomed into a significant reworking of textinput.c. After analyzing what would need to be done to implement cut, I realized that in order for it to work, there needed to be a more solid way of deleting a selection. After working for a few days in the wrong direction (I moved all caret related data to its own structure but it was too hard to implement), I finally settled on a better approach. One of the biggest hurdles was that inputs have two texts to work with, one for the visible box, and one for the gadget itself and these strings both have different encoding, so the offsets are not always the same. Previously seperate methods were used to edit both strings, and each offset was updated individually. I united these methods, and simplified it so that instead of updating both offsets, the gadget offset is calculated from the box offset whenever it is needed. I also added calls to delete_selection inside both textbox_delete and textbox_insert so that replacement is handled automatically. All in all, this patch provides: - Selected text replacement - Correct input box behavior when a selection is defined (right arrow moves caret to end of selection) - Correct cut functionaliy in both versions - Fixed bug where a selections end box could not be found - Fixed descrepancy between where the caret was placed and where the selection began when starting a drag-select Now, on to Downloads...
