emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#19300: closed (24.4.51; visual-line-mode messes up


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#19300: closed (24.4.51; visual-line-mode messes up after-string rendering when it spans all window columns)
Date: Wed, 10 Dec 2014 22:51:02 +0000

Your message dated Thu, 11 Dec 2014 00:50:48 +0200
with message-id <address@hidden>
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
address@hidden)


-- 
19300: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19300
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 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
...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: test-1.png
Description: PNG image

Attachment: test-2.png
Description: PNG image


--- End Message ---
--- Begin Message --- Subject: Re: bug#19300: 24.4.51; visual-line-mode messes up after-string rendering when it spans all window columns Date: Thu, 11 Dec 2014 00:50:48 +0200 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
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.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]