unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Romain Francoise <romain@orebokech.com>
Subject: Re: scroll-conservatively overflow
Date: Fri, 30 Apr 2004 13:35:03 +0200	[thread overview]
Message-ID: <87d65p1yxk.fsf@orebokech.com> (raw)
In-Reply-To: 87vfk0auk0.fsf@orebokech.com

[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]

Romain Francoise <romain@orebokech.com> writes:

> About scrolling: I've been bitten by a bug for some weeks now, I
> originally thought it was specific to the multi-tty code but I
> discovered this morning that it's not.  (A fresh checkout from CVS HEAD
> this morning exhibited the same issues.)

I have finally found enough time to track it down.  The change
responsible for all my scrolling problems is Richard's change to
indent.c on March 2nd:

2004-03-02  Richard M. Stallman  <rms@gnu.org>

	* indent.c (compute_motion): Save vpos in prev_vpos, like hpos etc.

Reverting this change (see attached patch) solves all issues in Dired,
Gnus, etc.

I have tried to come up with a fix but failed.  I don't really
understand why this change was necessary, it adds complexity and does
not fix anything as far as I can see.  If it was just a code cleanup,
maybe the best would be to revert it for the time being.

-- 
Romain Francoise <romain@orebokech.com> | This is a man's man's man's
it's a miracle -- http://orebokech.com/ | world. --James Brown

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: emacs-indent-fix.diff --]
[-- Type: text/x-patch, Size: 2421 bytes --]

Index: src/indent.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/indent.c,v
retrieving revision 1.160
diff -c -r1.160 indent.c
*** src/indent.c	5 Apr 2004 21:41:08 -0000	1.160
--- src/indent.c	30 Apr 2004 11:27:23 -0000
***************
*** 1197,1202 ****
--- 1197,1203 ----
      = (INTEGERP (current_buffer->selective_display)
         ? XINT (current_buffer->selective_display)
         : !NILP (current_buffer->selective_display) ? -1 : 0);
+   int prev_hpos = 0;
    int selective_rlen
      = (selective && dp && VECTORP (DISP_INVIS_VECTOR (dp))
         ? XVECTOR (DISP_INVIS_VECTOR (dp))->size : 0);
***************
*** 1224,1231 ****
    int wide_column_end_hpos = 0;
    int prev_pos;			/* Previous buffer position.  */
    int prev_pos_byte;		/* Previous buffer position.  */
-   int prev_hpos = 0;
-   int prev_vpos = 0;
    int contin_hpos;		/* HPOS of last column of continued line.  */
    int prev_tab_offset;		/* Previous tab offset.  */
  
--- 1225,1230 ----
***************
*** 1274,1280 ****
  		  pos = prev_pos;
  		  pos_byte = prev_pos_byte;
  		  hpos = prev_hpos;
- 		  vpos = prev_vpos;
  		  tab_offset = prev_tab_offset;
  		}
  	      break;
--- 1273,1278 ----
***************
*** 1384,1390 ****
  		  if (pos >= next_boundary)
  		    next_boundary = pos + 1;
  		  prev_hpos = width;
- 		  prev_vpos = vpos;
  		  prev_tab_offset = tab_offset;
  		}
  	    }
--- 1382,1387 ----
***************
*** 1417,1423 ****
  	  pos = prev_pos;
  	  pos_byte = prev_pos_byte;
  	  hpos = prev_hpos;
- 	  vpos = prev_vpos;
  	  tab_offset = prev_tab_offset;
  
  	  /* NOTE on contin_hpos, hpos, and prev_hpos.
--- 1414,1419 ----
***************
*** 1438,1443 ****
--- 1434,1443 ----
  	      hpos = contin_hpos;
  	      vpos = vpos - 1;
  	    }
+ 	  else if (c == '\n')
+ 	    /* If previous character is NEWLINE,
+ 	       set VPOS back to previous line */
+ 	    vpos = vpos - 1;
  	  break;
  	}
  
***************
*** 1455,1461 ****
  	      pos = prev_pos;
  	      pos_byte = prev_pos_byte;
  	      hpos = prev_hpos;
- 	      vpos = prev_vpos;
  	      tab_offset = prev_tab_offset;
  	    }
  	  break;
--- 1455,1460 ----
***************
*** 1464,1470 ****
  	break;
  
        prev_hpos = hpos;
-       prev_vpos = vpos;
        prev_pos = pos;
        prev_pos_byte = pos_byte;
        wide_column_end_hpos = 0;
--- 1463,1468 ----

[-- Attachment #3: Type: text/plain, Size: 141 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel

  reply	other threads:[~2004-04-30 11:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-16 10:00 scroll-conservatively overflow Juanma Barranquero
2004-04-16 13:17 ` Kim F. Storm
2004-04-16 14:03   ` Romain Francoise
2004-04-30 11:35     ` Romain Francoise [this message]
2004-04-30 16:38       ` Kim F. Storm
2004-05-01 17:50       ` Richard Stallman
2004-05-02 12:37         ` Romain Francoise
2004-05-02 16:58           ` Stefan Monnier
2004-05-03 14:03           ` Richard Stallman
2004-04-17 19:42   ` Richard Stallman
2004-04-17 20:52     ` Juanma Barranquero
2004-04-18 21:31       ` Kim F. Storm
2004-04-19 11:37       ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d65p1yxk.fsf@orebokech.com \
    --to=romain@orebokech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).