(Fnewline): Inhibit the insert-at-end-of-line hack
when at the top of the window.
#include "commands.h"
#include "buffer.h"
#include "syntax.h"
+#include "window.h"
Lisp_Object Qkill_forward_chars, Qkill_backward_chars, Vblink_paren_function;
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.