[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
display property with newline
From: |
Stephen Berman |
Subject: |
display property with newline |
Date: |
Mon, 04 Jun 2007 11:23:23 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
When a display text property contains a newline and some characters
following the newline, the latter are not displayed when the display
property is at (or perhaps when it overlaps) (window-start). To
reproduce:
1. emacs -Q
2. Type "test " 17 times, i.e., enough to make the line of text longer
than fill-column.
3. Put the cursor on column 70 and type
`M-: (put-text-property (1- (point)) (point) 'display " \n ")'
(the display string here is one space + a newline + five spaces, but
it is only important that it contain a newline and a following
character).
Now the buffer displays the following, where `|' marks the left
fringe, and the cursor is still on column 70, indicated by `^':
|test test test test test test test test test test test test test test
| test test test
^
4. Type M-: (scroll-up 1); now the buffer displays the following,
where again `|' marks the left fringe, and the cursor is still on
column 70, indicated by `^':
|test test test
^
A variant of this bug is seen by doing steps 1-3 and then reducing the
frame height (e.g. by dragging the mouse) one line at a time until the
window contains just one line (plus the mode line and the minibuffer),
at which point the text is displayed as in step 4.
Another example:
a. emacs -Q
b. Type " " (i.e., space)
c. Type M-: (put-text-property (1- (point)) (point) 'display "\n***"),
so that the buffer displays this:
|
|***
^
d. Now typing M-: (scroll-up 1) yields an "End of buffer" error, but
clicking the down arrow in the scroll bar (at least with the GTK+
toolkit) once makes the "***" disappear and the cursor get vertically
centered in the window. (If you put the cursor after "***" and then
click the down arrow in the scroll bar, "***" still vanishes but the
cursor is now at the top of the window.)
The first example can also be reproduced with emacs -nw -Q, however,
the resulting display after step 4 is different:
|t test
^
This bug also exists in the released Emacs 22.1 and appears to exist
already in 21.3, though there the behavior is somewhat different, due
I think to additional bugs that have been fixed in Emacs 22.
In GNU Emacs 22.1.50.3 (i686-pc-linux-gnu, GTK+ Version 2.10.6)
of 2007-06-03 on escher
Windowing system distributor `The X.Org Foundation', version 11.0.70199902
configured using `configure '--with-x-toolkit=gtk''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8
default-enable-multibyte-characters: t
Major mode: Fundamental
Minor modes in effect:
tooltip-mode: t
tool-bar-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
blink-cursor-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
Recent input:
<help-echo> C-x b t <return> M-x c o l u m <tab> <return>
t e s t SPC C-a C-k C-y C-y C-y C-y C-y C-y C-y C-y
C-y C-y C-y C-y C-y C-y C-y C-y C-y M-x r e p o r <tab>
<return>
Recent messages:
("emacs" "-Q")
For information about the GNU Project and its goals, type C-h C-p.
Column-Number mode enabled
Mark set [17 times]
Loading emacsbug...
Loading regexp-opt...done
Loading emacsbug...done
- display property with newline,
Stephen Berman <=