Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatted clipboard despite CopyAsRTF=no and CopyAsHTML=none #1042

Closed
mrinmoyg opened this issue Oct 14, 2020 · 8 comments
Closed

Formatted clipboard despite CopyAsRTF=no and CopyAsHTML=none #1042

mrinmoyg opened this issue Oct 14, 2020 · 8 comments
Labels

Comments

@mrinmoyg
Copy link

Version 3.4

I have:
Columns=80
Rows=62
BackgroundColour=100,100,100
ForegroundColour=232,232,232
Font=Courier
FontHeight=8
FontWeight=400
FontIsBold=no
CursorType=block
RightClickAction=paste
SwitchShortcuts=yes
ZoomShortcuts=no
ClickTargetMod=off
ScrollMod=off
TrimSelection=no
CursorBlinks=no
Term=xterm-256color
BoldAsColour=no
BoldAsFont=yes
ThemeFile=xterm
BellType=0
ScrollbackLines=10000
FontSmoothing=default
CopyAsRTF=no
CopyAsHTML=16842752
AllowSetSelection=no
CopyOnSelect=yes

But still I see background color getting copied on selection/copy.

@mintty
Copy link
Owner

mintty commented Oct 14, 2020

For issue reporting, it is generally appreciated to provide a "minimal test case", which would include cleaning the demonstrated configuration from irrelevant entries. The value for CopyAsHTML looks strange, by the way.
CopyAsHTML may well be the reason for formatted copying, actually. It cannot be reproduced, however, as you don't say how and to which application you copy.

@mintty mintty changed the title CopyAsRTF=no Not Working Formatted clipboard despite CopyAsRTF=no Oct 14, 2020
@mrinmoyg
Copy link
Author

mrinmoyg commented Oct 14, 2020

Sure. Copying is from mintty terminal to outlook.

No manual configuration was done on the .minttyrc, this is what was generated based on "options" from 3.4 mintty.

CopyAsHTML is set to "None" in the options (Selection->Copy As HTML).

@mintty
Copy link
Owner

mintty commented Oct 14, 2020

There must have gone something wrong in your config. Please change the value for CopyAsHTML and Save, change back and Save again.

@mintty
Copy link
Owner

mintty commented Oct 14, 2020

Hold on, the value is not cleared by this procedure, which I'll analyse.
So please set the value to 0 manually and check the resulting behaviour.

@mrinmoyg
Copy link
Author

mrinmoyg commented Oct 14, 2020

Yes, when I manually set the "CopyAsHTML" to 0 in ~/.minttyrc and relaunch my terminal, the copy/paste from mintty to outlook works without formatting (i.e no background).

1 hint if it helps, "16842752" is 0x1010000, and when I change the value from None->Partial->Default->Full, the value just increments by 1, but the Most significant 2 octets remain 0x0101, where the lower 2 bytes changes properly.

Note: I upgraded from 2.9 -> 3.4

mintty added a commit that referenced this issue Oct 14, 2020
@mintty
Copy link
Owner

mintty commented Oct 14, 2020

Uploaded a fix for the misinterpretation of CopyAsHTML, thanks for helping debug this.
I have no idea how the extra 0101 would have come into your config, and the new version would still not clear that, but it won't interpret it anymore when copying.

@mintty mintty changed the title Formatted clipboard despite CopyAsRTF=no Formatted clipboard despite CopyAsRTF=no and CopyAsHTML=none Oct 14, 2020
@mintty
Copy link
Owner

mintty commented Oct 24, 2020

Tweaked the fix. Bogus values would now be sanitized.

@mintty
Copy link
Owner

mintty commented Oct 24, 2020

Released 3.4.1.

@mintty mintty closed this as completed Oct 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants