Subject: bug#33864: 27.0.50; Display corruption with "small" font size when something is in the fringe

From: Dale Sedivec <[email-masked]>
Date: Tue, 25 Dec 2018 00:01:58 -0600

Using Emacs master with the NeXTStep interface on macOS, I get display
corruption on lines where features such as Flymake, Flycheck, or diff-hl
display something in the fringe.  This is a bit hard to describe, so I'm
attaching a screen shot, and I've also made a short movie of this happening:

https://www.dropbox.com/s/h9eqixqxst4wg37/emacs_27_small_font_fringe_problem.mp4?dl=0

Steps to reproduce:

1. Build or obtain Emacs from master (I did both, report data below is with
nightly build from emacsformacosx.com[1])

2. ~/Applications/Emacs.app/Contents/MacOS/Emacs -Q

3. Change font to Menlo 9 pt (default font here is Menlo 12 pt)

4. M-x find-library RET flymake RET (or open any file where Flymake will
produce anything in the fringe)

5. Turn on Flymake: M-x flymake-mode RET

6. M-x flymake-goto-next-error RET so that point moves to a line where
Flymake has indicated an error/warning/whatever in the left fringe

7. Move left and right on the line (using arrow keys or C-f/C-b)

Expected results: point moves but the line is otherwise unchanged

Observed results: parts/most/all of the line starts turning grey-on-grey as
you move left/right

[1]:
https://emacsformacosx.com/emacs-builds/Emacs-2018-12-24_01-40-33-fd244507c5ea1e7e425f09585fcf15cc90598e9b-universal.dmg

Just to be clear, this makes Emacs GUI unusable for me on macOS as long as
I want to use anything that utilizes the fringe.

Additional information:

* The display corruption will linger on lines if you have multiple lines
with something in the fringe in the viewport and you move vertically
between them

* This problem does not happen with Flymake and the default 12 pt Menlo font

* I have not seen this problem occur on lines without something in the
fringe, even when using the smaller-than-default Menlo 9 pt font

* This doesn't happen for me on the emacs-26 branch at any font size

* I have also reproduced this with the Fira Mono font at 8 pt (which is my
normal font)

I am using macOS 10.13.6 on a late 2013 MacBook Pro 15" that has a Retina
("high DPI") display.

Happy to provide more information or do more troubleshooting, just let me
know.  Thanks!  Dale

In GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin14.5.0, NS appkit-1348.17
Version 10.10.5 (Build 14F2511))
 of 2018-12-24 built on builder10-10.porkrind.org
Windowing system distributor 'Apple', version 10.3.1561
System Description:  Mac OS X 10.13.6

Recent messages:

For information about GNU Emacs and the GNU system, type C-h C-a.
Quit
Entering debugger...
Back to top level
nil
Flymake mode enabled in current buffer
Mark set
Mark saved where search started [2 times]
Making completion list...

Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES
THREADS

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  flymake-mode: t
  diff-auto-refine-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt bytecomp
byte-compile cconv dired dired-loaddefs format-spec rfc822 mml mml-sec
password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs
time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils misearch multi-isearch autoload lisp-mnt checkdoc
cl-macs gv cl-seq flymake-proc flymake compile comint ansi-color ring
warnings thingatpt help-fns radix-tree cl-print debug backtrace
help-mode find-func cl-loaddefs cl-lib vc-git diff-mode easymenu
easy-mmode elec-pair tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads kqueue cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 228548 14897)
 (symbols 48 22728 1)
 (strings 32 36845 2246)
 (string-bytes 1 1015461)
 (vectors 16 44960)
 (vector-slots 8 1500556 164302)
 (floats 8 56 213)
 (intervals 56 719 269)
 (buffers 992 17))