https://bugs.kde.org/show_bug.cgi?id=449732
Bug ID: 449732 Summary: When copying text from the merge output, copying tabs copies the wrong region of text Product: kdiff3 Version: 1.9.4 Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: application Assignee: reeves...@gmail.com Reporter: nyanpas...@tuta.io Target Milestone: --- Created attachment 146376 --> https://bugs.kde.org/attachment.cgi?id=146376&action=edit Two text files with tabs in them, demonstrating the bug. SUMMARY If I merge two files with tabs in them, and (in the merge output pane) select and text containing tabs, the copied region is shorter and earlier than the text selected. STEPS TO REPRODUCE 1. To match my observed results, set kdiff3's tab width to 4. 2. Download and extract the attachment, and run `kdiff3 -m a b`. Alternatively run kdiff3, open a and b, then trigger a merge. 3. Resolve the merge conflict by selecting both A and B. 4. In the output pane, select "\t\tasdfasdf" and copy it. (Alternatively try copying "asdfasdf" for different results.) This bug does not occur when copying from the input file panes. OBSERVED RESULT The clipboard contains "\t\tas". kdiff3 sees that we have 10 physical characters (two tabs followed by 8 alphabetical), but wrongly copies 10 visual characters instead (two tabs of width 4, followed by 2 alphabetical). If you copied "asdfasdf", kdiff3 sees that we want to copy physical characters 2 through 10, and wrongly copies visual characters 2 through 10 (dropping the second half of the first \t from 0 through 4, copying the second \t from 4 through 8, then copying the first "as" from 8 through 10). EXPECTED RESULT The clipboard contains "\t\tasdfasdf" or the text we have selected. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.23.90 KDE Frameworks Version: 5.90.0 Qt Version: 5.15.2 Kernel Version: 5.16.4-zen1-1-zen (64-bit) Graphics Platform: X11 Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor Memory: 15.6 GiB of RAM Graphics Processor: NVIDIA GeForce GT 730/PCIe/SSE2 ADDITIONAL INFORMATION -- You are receiving this mail because: You are watching all bug changes.