doublecmd / doublecmd

Double Commander is a free cross platform open source file manager with two panels side by side.

Home Page:https://doublecmd.sourceforge.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to select and copy text from MacPreview

nitrostudios opened this issue · comments

Version

Double Commander
Version: 1.2.0 alpha
Revision: 11223
Commit: a5009f6
Build date: 2024/02/13
Lazarus: 3.99.0.0
FPC: 3.2.2
Platform: aarch64-Darwin-cocoa
OS version: Mac OS X 12.6.6

Description

I'm unable to select and copy text from MacPreview when previewing the TXT files. Anyone else having the same issue?

I propose to disable MacPreview for text files. It works wrong with some formats, like .bat.

Is there a way to use the native macOS preview, then? In finder it works without problems and can show and copy text, too. It would help with navigation when previewing files in the folder by using arrows to select the next/previous file, like in Finder.

MacPreview is a native preview.

That's interesting since it look quite different from native preview.

@nitrostudios

it's an embedded Native Preview, to integrate with DC.

@alexx2000

how to identify whether it is a plain text file?

I propose to disable MacPreview for text files. It works wrong with some formats, like .bat.

No, in this case. Is no way to determine which formats QuickLook really supports?

maybe simply
EXT!=""&EXT!="TXT"&EXT!="BAT" etc
https://ghisler.github.io/WLX-SDK/listgetdetectstring.htm

Yes, we can use this method as workaround. We can exclude most popular plain text formats.

i'm afraid there are too many plain text formats.

Maybe need to add text file detection to the plugin and skip them? Maybe optional?
(But the FileIsText function in Lazarus has problems.)

I found a way how to determine which file types Quick Look supports. I am working on it implementation in the MacPreview.

@alexx2000

it's great.

just test d2bef61, it works fine on macOS 12.

I found a way how to determine which file types Quick Look supports. I am working on it implementation in the MacPreview.

Macpreview was not working properly in 1.1.12gamma. It was opening files in very small font. Selection was not working. Search was not working.
Now all listed is fixed in 1.1.13. Thank you!
image