# HG changeset patch # User Richard M. Stallman # Date 779602015 0 # Node ID a6be4973b11fa7bbb34d17fa58d37f2d15bb37db # Parent 244c6e5c5f4b872f53963bcbe04edee8fe10f8d5 Include window.h. (Fnewline): Inhibit the insert-at-end-of-line hack when at the top of the window. diff -r 244c6e5c5f4b -r a6be4973b11f src/cmds.c --- 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.