File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 6666 :type 'string
6767 :group 'go-guru )
6868
69+ (defcustom go-guru-truncate-file-length 20
70+ " The length to truncate the file name to in the output buffer."
71+ :type 'integer
72+ :group 'go-guru )
73+
6974(defvar go-guru--scope-history
7075 nil
7176 " History of values supplied to `go-guru-set-scope' ." )
@@ -231,9 +236,10 @@ output of the Go guru tool."
231236 (setq p (1- p)) ; exclude final space
232237 (let* ((posn (buffer-substring-no-properties start p))
233238 (flen (cl-search " :" posn)) ; length of filename
234- (filename (if (< flen 19 )
239+ (truncate (- (max go-guru-truncate-file-length 20 ) 1 ))
240+ (filename (if (< flen truncate)
235241 (substring posn 0 flen)
236- (concat " …" (substring posn (- flen 19 ) flen)))))
242+ (concat " …" (substring posn (- flen truncate ) flen)))))
237243 (put-text-property start p 'display filename)
238244 (forward-line 1 )
239245 (setq start (point ))))))))
You can’t perform that action at this time.
0 commit comments