* [jimb@red-bean.com: Redisplay bug in 21.2.90.1]
@ 2002-06-11 7:30 Kim F. Storm
2002-06-13 23:14 ` Kim F. Storm
0 siblings, 1 reply; 7+ messages in thread
From: Kim F. Storm @ 2002-06-11 7:30 UTC (permalink / raw)
Cc: Jim Blandy
------- Start of forwarded message -------
This bug is also present in 21.1 and CVS.
I'll take a look at it.
++kfs
To: emacs-pretesters@gnu.org
Subject: Redisplay bug in 21.2.90.1
From: Jim Blandy <jimb@red-bean.com>
Date: 10 Jun 2002 19:23:46 -0500
I've found a bug in redisplay in Emacs 21.2.90.1, running under Red
Hat Linux 7.2 on an i686-pc-linux-gnu, compiled with gcc (GCC) 3.2
20020506 (experimental).
Put the following text in the file bar.c:
- ---- cut below
#include <stdio.h>
#include <pthread.h>
int
main (int argc, char **argv)
- ---- cut above
Now start emacs under X Windows: emacs -geometry 80x40 -q
Type the following commands (ignore the <help-echo>; this is `C-h l'
output):
<help-echo> C-x C-f b a r . c <return> M-> { <return>
} C-p <help-echo> <return> <tab> r e t u r n SPC 0
; C-a C-x C-s
The window showing bar.c will now display:
- ---- cut below
#include <stdio.h>
#include <pthread.h>
int
main (int argc, char **argv)
{
return 0;
}
}
- ---- cut above
Note the extra closing curly brace there. But if you hit C-l, it goes
away.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [jimb@red-bean.com: Redisplay bug in 21.2.90.1]
2002-06-11 7:30 [jimb@red-bean.com: Redisplay bug in 21.2.90.1] Kim F. Storm
@ 2002-06-13 23:14 ` Kim F. Storm
2002-06-14 1:06 ` Jim Blandy
2002-06-14 15:47 ` Richard Stallman
0 siblings, 2 replies; 7+ messages in thread
From: Kim F. Storm @ 2002-06-13 23:14 UTC (permalink / raw)
Cc: Jim Blandy
I tracked this down to a bug in `insert' which doesn't
adjust END_UNCHANGED in case the insert happens in the
unchanged region. This happens if require-final-newline
it t (e.g. in c-mode) when doing save-buffer.
I just committed a fix on HEAD.
I guess it isn't serious enough to include on RC branch...?
++kfs
"Kim F. Storm" <storm@cua.dk> writes:
> ------- Start of forwarded message -------
>
> This bug is also present in 21.1 and CVS.
> I'll take a look at it.
>
> ++kfs
>
> To: emacs-pretesters@gnu.org
> Subject: Redisplay bug in 21.2.90.1
> From: Jim Blandy <jimb@red-bean.com>
> Date: 10 Jun 2002 19:23:46 -0500
>
>
> I've found a bug in redisplay in Emacs 21.2.90.1, running under Red
> Hat Linux 7.2 on an i686-pc-linux-gnu, compiled with gcc (GCC) 3.2
> 20020506 (experimental).
>
> Put the following text in the file bar.c:
>
> - ---- cut below
> #include <stdio.h>
> #include <pthread.h>
>
> int
> main (int argc, char **argv)
> - ---- cut above
>
> Now start emacs under X Windows: emacs -geometry 80x40 -q
>
> Type the following commands (ignore the <help-echo>; this is `C-h l'
> output):
>
> <help-echo> C-x C-f b a r . c <return> M-> { <return>
> } C-p <help-echo> <return> <tab> r e t u r n SPC 0
> ; C-a C-x C-s
>
> The window showing bar.c will now display:
>
> - ---- cut below
> #include <stdio.h>
> #include <pthread.h>
>
> int
> main (int argc, char **argv)
> {
> return 0;
> }
> }
> - ---- cut above
>
> Note the extra closing curly brace there. But if you hit C-l, it goes
> away.
>
>
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://mail.gnu.org/mailman/listinfo/emacs-devel
>
>
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [jimb@red-bean.com: Redisplay bug in 21.2.90.1]
2002-06-13 23:14 ` Kim F. Storm
@ 2002-06-14 1:06 ` Jim Blandy
2002-06-14 15:47 ` Richard Stallman
1 sibling, 0 replies; 7+ messages in thread
From: Jim Blandy @ 2002-06-14 1:06 UTC (permalink / raw)
Cc: emacs-devel
storm@cua.dk (Kim F. Storm) writes:
> I tracked this down to a bug in `insert' which doesn't
> adjust END_UNCHANGED in case the insert happens in the
> unchanged region. This happens if require-final-newline
> it t (e.g. in c-mode) when doing save-buffer.
>
> I just committed a fix on HEAD.
>
> I guess it isn't serious enough to include on RC branch...?
I have to say, I think it is serious enough. If I can't trust
redisplay as I edit simple C code, that's pretty annoying.
Also --- could you post the patch?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [jimb@red-bean.com: Redisplay bug in 21.2.90.1]
2002-06-13 23:14 ` Kim F. Storm
2002-06-14 1:06 ` Jim Blandy
@ 2002-06-14 15:47 ` Richard Stallman
2002-06-14 22:54 ` Kim F. Storm
1 sibling, 1 reply; 7+ messages in thread
From: Richard Stallman @ 2002-06-14 15:47 UTC (permalink / raw)
Cc: emacs-devel, jimb
I just committed a fix on HEAD.
Thanks.
I guess it isn't serious enough to include on RC branch...?
Maybe it is--it depends how safe the fix is. Could you show us the fix?
(Thanks, Jim, also.)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [jimb@red-bean.com: Redisplay bug in 21.2.90.1]
2002-06-14 15:47 ` Richard Stallman
@ 2002-06-14 22:54 ` Kim F. Storm
2002-06-15 21:47 ` Richard Stallman
0 siblings, 1 reply; 7+ messages in thread
From: Kim F. Storm @ 2002-06-14 22:54 UTC (permalink / raw)
Cc: emacs-devel, jimb
Richard Stallman <rms@gnu.org> writes:
> I just committed a fix on HEAD.
>
> Thanks.
>
> I guess it isn't serious enough to include on RC branch...?
>
> Maybe it is--it depends how safe the fix is.
I think the fix is quite safe.
I actually added the fix in three different functions which
inserts text in a buffer. Only one of these funtions was
responsible for the behaviour reported by Jim.
> Could you show us the fix?
>
Index: insdel.c
===================================================================
RCS file: /cvs/emacs/src/insdel.c,v
retrieving revision 1.166
retrieving revision 1.167
diff -c -r1.166 -r1.167
*** insdel.c 9 Feb 2002 22:57:25 -0000 1.166
--- insdel.c 13 Jun 2002 22:07:13 -0000 1.167
***************
*** 1031,1036 ****
--- 1031,1040 ----
if (GPT_BYTE < GPT)
abort ();
+ /* The insert may have been in the unchanged region, so check again. */
+ if (Z - GPT < END_UNCHANGED)
+ END_UNCHANGED = Z - GPT;
+
adjust_overlays_for_insert (PT, nchars);
adjust_markers_for_insert (PT, PT_BYTE,
PT + nchars, PT_BYTE + nbytes,
***************
*** 1154,1159 ****
--- 1158,1167 ----
if (GPT_BYTE < GPT)
abort ();
+ /* The insert may have been in the unchanged region, so check again. */
+ if (Z - GPT < END_UNCHANGED)
+ END_UNCHANGED = Z - GPT;
+
adjust_overlays_for_insert (PT, nchars);
adjust_markers_for_insert (PT, PT_BYTE, PT + nchars,
PT_BYTE + outgoing_nbytes,
***************
*** 1300,1305 ****
--- 1308,1317 ----
if (GPT_BYTE < GPT)
abort ();
+
+ /* The insert may have been in the unchanged region, so check again. */
+ if (Z - GPT < END_UNCHANGED)
+ END_UNCHANGED = Z - GPT;
adjust_overlays_for_insert (PT, nchars);
adjust_markers_for_insert (PT, PT_BYTE, PT + nchars,
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [jimb@red-bean.com: Redisplay bug in 21.2.90.1]
2002-06-14 22:54 ` Kim F. Storm
@ 2002-06-15 21:47 ` Richard Stallman
2002-06-17 22:35 ` Kim F. Storm
0 siblings, 1 reply; 7+ messages in thread
From: Richard Stallman @ 2002-06-15 21:47 UTC (permalink / raw)
Cc: emacs-devel, jimb
This fix looks quite safe; please put it in RC.
Thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [jimb@red-bean.com: Redisplay bug in 21.2.90.1]
2002-06-15 21:47 ` Richard Stallman
@ 2002-06-17 22:35 ` Kim F. Storm
0 siblings, 0 replies; 7+ messages in thread
From: Kim F. Storm @ 2002-06-17 22:35 UTC (permalink / raw)
Cc: storm, emacs-devel, jimb
Richard Stallman <rms@gnu.org> writes:
> This fix looks quite safe; please put it in RC.
>
> Thanks.
Done.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2002-06-17 22:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-11 7:30 [jimb@red-bean.com: Redisplay bug in 21.2.90.1] Kim F. Storm
2002-06-13 23:14 ` Kim F. Storm
2002-06-14 1:06 ` Jim Blandy
2002-06-14 15:47 ` Richard Stallman
2002-06-14 22:54 ` Kim F. Storm
2002-06-15 21:47 ` Richard Stallman
2002-06-17 22:35 ` Kim F. Storm
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.