From: Dmitry Gutov <dgutov@yandex.ru>
To: 19300@debbugs.gnu.org
Subject: bug#19300: 24.4.51; visual-line-mode messes up after-string rendering when it spans all window columns
Date: Mon, 08 Dec 2014 01:50:34 +0200 [thread overview]
Message-ID: <86a92zhved.fsf@yandex.ru> (raw)
[-- Attachment #1: Type: text/plain, Size: 2426 bytes --]
...when a certain popular font is used. Visual line breaks are inserted,
and it can break the visuals quite badly. For some reason, it happens
not every time I try it in practice, but the test example below shows
this result quite reliably.
Enlarge Emacs so that its width is big enough for pop-to-buffer to
prefer horizontal splits, evaluate the code below and then `M-x test-1'
or `M-x test-2'. The propertizing with `face' below only serves to show
better how the string gets distorted.
;; https://github.com/mozilla/Fira/blob/master/ttf/FiraMono-Regular.ttf?raw=true
(set-face-attribute 'default nil :height 105 :family "Fira Mono")
(defun test-propertize-strings (strings)
(concat "\n"
(mapconcat (lambda (str) (propertize str 'face 'highlight))
strings
"\n")
"\n"))
(defvar test-string-1 (test-propertize-strings
'(" ad-Advice-call-interactively "
" ad-Advice-compilation-find-file "
" ad-Advice-copy-region-as-kill ")))
(defvar test-string-2 (test-propertize-strings
'(" ad-Advice-Info-read-node-name "
" ad-Advice-add-to-history <f> "
" ad-Advice-apropos <f> "
" ad-Advice-beginning-of-buffer "
" ad-Advice-delete-file <f> "
" ad-Advice-delete-window <f> ")))
(defun test-1 ()
(interactive)
(pop-to-buffer "test-1")
(visual-line-mode 1)
(enlarge-window-horizontally (- 34 (window-width)))
(let ((ov (make-overlay (1+ (point)) (1+ (point)) nil t t)))
(overlay-put ov 'invisible t)
(overlay-put ov 'after-string test-string-1)
(overlay-put ov 'window (selected-window))))
(defun test-2 ()
(interactive)
(pop-to-buffer "test-2")
(visual-line-mode 1)
(enlarge-window-horizontally (- 32 (window-width)))
(let ((ov (make-overlay (1+ (point)) (1+ (point)) nil t t))
(str test-string-2))
(overlay-put ov 'invisible t)
(overlay-put ov 'after-string str)
(overlay-put ov 'window (selected-window))))
See attached screenshots for how the results look.
In GNU Emacs 24.4.51.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
of 2014-11-28 on axl
Repository revision: 6b765b8facbdbb03f28028007885236601652515
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description: Ubuntu 14.04.1 LTS
(Also reproducible in 25.0.50.1).
Inspired by https://github.com/company-mode/company-mode/issues/249.
[-- Attachment #2: test-1.png --]
[-- Type: image/png, Size: 13739 bytes --]
[-- Attachment #3: test-2.png --]
[-- Type: image/png, Size: 17405 bytes --]
next reply other threads:[~2014-12-07 23:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-07 23:50 Dmitry Gutov [this message]
2014-12-08 3:46 ` bug#19300: 24.4.51; visual-line-mode messes up after-string rendering when it spans all window columns Eli Zaretskii
2014-12-08 10:14 ` Dmitry Gutov
2014-12-08 16:04 ` Eli Zaretskii
2014-12-08 16:40 ` Dmitry Gutov
2014-12-08 17:03 ` Eli Zaretskii
2014-12-08 18:47 ` Dmitry Gutov
2014-12-08 20:39 ` Eli Zaretskii
2014-12-09 0:51 ` Dmitry Gutov
2014-12-09 16:11 ` Eli Zaretskii
2014-12-09 17:30 ` Dmitry Gutov
2014-12-09 17:51 ` Eli Zaretskii
2014-12-09 18:38 ` Dmitry Gutov
2014-12-09 18:50 ` Eli Zaretskii
2014-12-10 17:58 ` Eli Zaretskii
2014-12-10 22:50 ` Dmitry Gutov
2014-12-11 3:42 ` Eli Zaretskii
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=86a92zhved.fsf@yandex.ru \
--to=dgutov@yandex.ru \
--cc=19300@debbugs.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.