changeset 15772:eb1cef7102e3

(readline_internal) [DOS_NT]: Don't include CRs when computing character positions in source files.
author Richard M. Stallman <rms@gnu.org>
date Tue, 23 Jul 1996 16:32:24 +0000
parents ac60bc3e89cd
children e68aaf2bb5ac
files lib-src/etags.c
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/etags.c	Tue Jul 23 16:17:39 1996 +0000
+++ b/lib-src/etags.c	Tue Jul 23 16:32:24 1996 +0000
@@ -4105,7 +4105,16 @@
 	  if (p > buffer && p[-1] == '\r')
 	    {
 	      *--p = '\0';
+#ifdef DOS_NT
+	      /* Assume CRLF->LF translation will be performed by Emacs
+		 when loading this file, so CRs won't appear in the buffer.
+		 It would be cleaner to compensate within Emacs;
+		 however, Emacs does not know how many CRs were deleted
+		 before any given point in the file.  */
+	      chars_deleted = 1;
+#else
 	      chars_deleted = 2;
+#endif
 	    }
 	  else
 	    {