changeset 8755:a6be4973b11f

Include window.h. (Fnewline): Inhibit the insert-at-end-of-line hack when at the top of the window.
author Richard M. Stallman <rms@gnu.org>
date Thu, 15 Sep 1994 04:06:55 +0000
parents 244c6e5c5f4b
children 1c9ee34d9094
files src/cmds.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/cmds.c	Thu Sep 15 03:47:07 1994 +0000
+++ b/src/cmds.c	Thu Sep 15 04:06:55 1994 +0000
@@ -23,6 +23,7 @@
 #include "commands.h"
 #include "buffer.h"
 #include "syntax.h"
+#include "window.h"
 
 Lisp_Object Qkill_forward_chars, Qkill_backward_chars, Vblink_paren_function;
 
@@ -253,6 +254,11 @@
      features all do nothing in that case.  */
 
   flag = point > BEGV && FETCH_CHAR (point - 1) == '\n';
+  /* Don't do this if at the beginning of the window.  */
+  if (XBUFFER (XWINDOW (selected_window)->buffer) == current_buffer
+      && marker_position (XWINDOW (selected_window)->start) == PT)
+    flag = 0;
+
 #ifdef USE_TEXT_PROPERTIES
   /* We cannot use this optimization if properties change
      in the vicinity.