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

adds a customization for how much of the filename gets truncated #289

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cbbaker
Copy link

@cbbaker cbbaker commented Aug 12, 2019

The length of the filename in the go guru output was hardcoded to 20,
and I wanted it longer, so I added a customization.

The length of the filename in the go guru output was hardcoded to 20,
and I wanted it longer, so I added a customization.
@psanford
Copy link
Collaborator

Can you rebase or squash this PR to get rid of the extra merge commit?

@cbbaker
Copy link
Author

cbbaker commented Aug 13, 2019

I think I did this right. Let me know :)

@@ -231,9 +236,10 @@ output of the Go guru tool."
(setq p (1- p)) ; exclude final space
(let* ((posn (buffer-substring-no-properties start p))
(flen (cl-search ":" posn)) ; length of filename
(filename (if (< flen 19)
(truncate (- (max go-guru-truncate-file-length 20) 1))
Copy link
Owner

Choose a reason for hiding this comment

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

I don't understand the use of max here. Can we not truncate to less than 20 characters?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants