GNU bug report logs -
#19300
24.4.51; visual-line-mode messes up after-string rendering when it spans all window columns
Previous Next
Reported by: Dmitry Gutov <dgutov <at> yandex.ru>
Date: Sun, 7 Dec 2014 23:51:02 UTC
Severity: normal
Found in version 24.4.51
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Thu, 11 Dec 2014 00:50:48 +0200
with message-id <5488CE48.9030208 <at> yandex.ru>
and subject line Re: bug#19300: 24.4.51; visual-line-mode messes up after-string rendering when it spans all window columns
has caused the debbugs.gnu.org bug report #19300,
regarding 24.4.51; visual-line-mode messes up after-string rendering when it spans all window columns
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
19300: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19300
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
...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.
[test-1.png (image/png, attachment)]
[test-2.png (image/png, attachment)]
[Message part 6 (message/rfc822, inline)]
On 12/10/2014 07:58 PM, Eli Zaretskii wrote:
> Turned out it was a remnant of a distant past. Originally,
> overflow-newline-into-fringe was not supported when word-wrap was in
> effect. That was fixed more than 5 years ago (see bug#2749), except
> in one corner case: when the last character before the newline is a
> whitespace character.
>
> I fixed that now on the emacs-24 branch (commit 0c2f254), please
> test. Please be sure to test cursor motion, as this affects that as
> well.
Thanks! Wrapping seems to work as expected now.
The cursor movement also looks fine, except that now that I know about
the newline-in-fringe indicator, seems a bit weird that it's only
displayed when the window body width is a multiple of a column width.
This bug report was last modified 10 years and 225 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.