From: "D Chiesa" <dpchiesa@hotmail.com>
To: "Eli Zaretskii" <eliz@gnu.org>
Cc: 5908@debbugs.gnu.org
Subject: bug#5908: tooltip-show breaks with multiline tip on Emacs for Windows v22.2.1
Date: Fri, 9 Apr 2010 10:18:27 -0400 [thread overview]
Message-ID: <COL124-DS442C13756B2B1C745AB94CE150@phx.gbl> (raw)
In-Reply-To: <83zl1dyrx9.fsf@gnu.org>
> This is a known and a nasty problem, present in Emacs 23 as well. The
> ugly part is that the behavior depends on the size of the font used
> for the tooltips. If you play with that font's definition, you will
> eventually find a size where the clipping doesn't happen. (The value
> depends on the size and resolution of your monitor.)
>
> Someone who knows much more about GUI display than I do should look
> into this, because I can spot nothing wrong in the code.
>
Thanks I'll look into adjusting the font myself.
As another workaround, individuals can use advice on tooltip-show. If you
append a newline onto the text, it tends to display without clipping,
although you get the opposite problem - too much dead space.
(defun cheeso-reform-string (limit arg)
(let ((orig arg) (modified "") (curline "") word
(words (split-string arg " ")))
(while words
(progn
(setq curline "")
(while (and words (< (length curline) limit))
(progn
(setq word (car words))
(setq words (cdr words))
(setq curline (concat curline " " word))))
(setq modified (concat modified curline "\n"))))
(setq modified (concat modified " \n")))
)
(defadvice tooltip-show (before
flymake-csharp-fixup-tooltip
(arg &optional use-echo-area)
activate compile)
(progn
(if (and (not use-echo-area)
(eq major-mode 'csharp-mode))
(let ((orig (ad-get-arg 0)))
(ad-set-arg 0 (cheeso-reform-string 72 orig))
))))
prev parent reply other threads:[~2010-04-09 14:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-08 18:10 bug#5908: tooltip-show breaks with multiline tip on Emacs for Windows v22.2.1 D Chiesa
2010-04-08 19:17 ` Chong Yidong
2010-04-08 19:35 ` Glenn Morris
2010-04-09 16:58 ` Jan Djärv
2010-04-09 22:13 ` YAMAMOTO Mitsuharu
2010-04-10 6:45 ` Jan Djärv
2010-04-10 10:59 ` YAMAMOTO Mitsuharu
2010-04-09 8:02 ` Eli Zaretskii
2010-04-09 14:18 ` D Chiesa [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=COL124-DS442C13756B2B1C745AB94CE150@phx.gbl \
--to=dpchiesa@hotmail.com \
--cc=5908@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.