Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Conversation

@mhutch
Copy link
Contributor

@mhutch mhutch commented Aug 23, 2018

Fixes #5709. Item titles are no longer ellipsized to 16 chars, and the tooltip shows a decent sized snippet.

image

@mhutch mhutch requested a review from mkrueger August 23, 2018 14:14
@mhutch
Copy link
Contributor Author

mhutch commented Aug 23, 2018

Failure appears to be unrelated

@sevoku sevoku self-requested a review August 23, 2018 14:49
@Therzok Therzok self-requested a review August 24, 2018 16:16

clipboardRing.Add (newNode ?? CreateClipboardToolboxItem (text));

while (clipboardRing.Count > clipboardRingSize) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

int overflow = clipboardRing.Count - clipboardRingSize;
if (overflow > 0) {
    clipboardRing.RemoveRange (0, overflow);
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is old code, but good point

var item = new ClipboardToolboxNode (text);

string [] lines = text.Split ('\n');
for (int i = 0; i < 3 && i < lines.Length; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a reusable stringbuilder from the cache to build the description?

Copy link
Contributor Author

@mhutch mhutch Aug 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, old code but this is redundant now since I added the custom tooltip

@mhutch mhutch force-pushed the clipboard-ring-toolbox-cleanup branch from d3087e0 to 2d5606d Compare August 27, 2018 16:57
Copy link
Contributor

@Therzok Therzok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@mhutch mhutch force-pushed the clipboard-ring-toolbox-cleanup branch 2 times, most recently from 22caba1 to 317c37b Compare September 4, 2018 21:05
@mhutch mhutch force-pushed the clipboard-ring-toolbox-cleanup branch from 317c37b to 5b7d0c1 Compare September 10, 2018 19:52
@mhutch mhutch merged commit 8565768 into master Sep 10, 2018
@Therzok Therzok deleted the clipboard-ring-toolbox-cleanup branch May 24, 2019 03:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants