Skip to content

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

Open
cbbaker wants to merge 1 commit intodominikh:masterfrom
cbbaker:master
Open

adds a customization for how much of the filename gets truncated#289
cbbaker wants to merge 1 commit intodominikh:masterfrom
cbbaker:master

Conversation

@cbbaker
Copy link
Copy Markdown

@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
Copy Markdown
Contributor

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

@cbbaker
Copy link
Copy Markdown
Author

cbbaker commented Aug 13, 2019

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

Comment thread go-guru.el
(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
Copy Markdown
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