unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#31666: Bad interaction between visual-line-mode and wrap-prefix on long lines
@ 2018-05-31 12:27 Clément Pit-Claudel
  2018-05-31 15:06 ` Eli Zaretskii
  0 siblings, 1 reply; 16+ messages in thread
From: Clément Pit-Claudel @ 2018-05-31 12:27 UTC (permalink / raw)
  To: 31666


[-- Attachment #1.1: Type: text/plain, Size: 2471 bytes --]

Hi all,

I use adaptive-wrap-prefix-mode from ELPA to get nice looking line-wrapping, and I also usually have visual-line-mode enabled.  Using the two together causes a rendering issue for long lines with no spaces in them: they are displayed with a preceding blank line added.

The following snippet demonstrates the problem:

(with-current-buffer (get-buffer-create "wrap")
  (text-mode)
  (visual-line-mode)
  (erase-buffer)
  (let* ((prefix (make-string 16 ?\s))
         (aaa (make-string 260 ?A)))
    (insert prefix (propertize aaa 'wrap-prefix prefix) "\n")
    (insert (propertize (concat prefix aaa) 'wrap-prefix prefix) "\n"))
  (display-buffer (current-buffer)))

Here's what the output looks like:

-----------
               
                AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                AAAA
               
                AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                AAAA
-----------

Notice how each line of AAA is preceded with a blank line (containing just 15 spaces).  I was expecting that code to produce this rendering instead (This is what you get if you turn off visual-line-mode):

-----------
                AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                AAAA
                AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                AAAA
-----------

Is this expected?

Thanks,
Clément.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-06-09 12:45 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-31 12:27 bug#31666: Bad interaction between visual-line-mode and wrap-prefix on long lines Clément Pit-Claudel
2018-05-31 15:06 ` Eli Zaretskii
2018-05-31 23:16   ` Clément Pit-Claudel
2018-06-01  0:19     ` Noam Postavsky
2018-06-01  7:02       ` Stephen Berman
2018-06-01  7:32         ` Eli Zaretskii
2018-06-01  8:00           ` Stephen Berman
2018-06-01  8:44             ` Eli Zaretskii
2018-06-01  7:36     ` Eli Zaretskii
2018-06-08 18:04       ` Clément Pit-Claudel
2018-06-08 18:32         ` Eli Zaretskii
2018-06-08 19:24           ` Eli Zaretskii
2018-06-08 19:32             ` Clément Pit-Claudel
2018-06-08 21:19           ` Clément Pit-Claudel
2018-06-09  8:42             ` Eli Zaretskii
2018-06-09 12:45               ` Clément Pit-Claudel

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).