text input: fix problem with autoindenting and ^^D
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 29 Dec 2009 18:07:19 +0000 (19:07 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 1 Jan 2010 15:34:12 +0000 (16:34 +0100)
commitfad63735be828f27b77e74782ecae92d04685b54
treeba2e098254c0e0c41c216261c94a1cce05aecfb1
parent5cea8aab3d05e48942ea2bf7a9ae81a1216083b4
text input: fix problem with autoindenting and ^^D

The following sequence would lead to an abort:

:se ai^Mi^I^M^^Da^D

The problem appears to be that the carat state is overloaded
to track both the current state and something that happened
before ("C_NOCHANGE").  Keep track of "nochange" in a separate
variable.

Problem reported and analyzed by Peter Bex <Peter.Bex@xs4all.nl>
common/common.h
ex/ex_txt.c
vi/v_txt.c