doublecmd icon indicating copy to clipboard operation
doublecmd copied to clipboard

Internal editor/viewer can't copy text past a certain point

Open dandv opened this issue 10 months ago • 3 comments

Version

Double Commander Version: 1.1.22 gamma Revision: 662 Commit: 6baafba86 Build date: 2025/01/19 Lazarus: 2.2.6.0 FPC: 3.2.2 Platform: x86_64-Linux-qt5 OS version: Fedora release 38 (Thirty Eight)

Widgetset library: Qt 5.15.12

Description

I've figured it's more fun to figure out why this bug happens, rather than just list the cause :)

nullchar.md

dandv avatar Mar 03 '25 06:03 dandv

Null character is a string terminator character (in the C-API). Regular text files does not contain a null character. So technically this file are binary file. Several text editors cannot display text after a null character. So I think it is a limitation, not a bug.

alexx2000 avatar Mar 03 '25 07:03 alexx2000

From a non-technical user's perspective, maybe it's not a bug, maybe it's a limitation, but for sure the intended functionality doesn't work.

As a stop-gap measure, would it be possible to highlight the null character? VS Code does that, and it helped figure out immediately what was wrong (vs. the invisible null in DC or Kate):

Image

dandv avatar Mar 04 '25 04:03 dandv

I can show error that text can't be copied because contains a binary data.

As a stop-gap measure, would it be possible to highlight the null character?

In the plain-text viewer - yes. In the code viewer/editor - no, this is out of my control.

alexx2000 avatar Mar 04 '25 06:03 alexx2000