X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:subject:message-id:references
	:mime-version:content-type:in-reply-to; q=dns; s=default; b=tOJt
	UmmWveebncFE4EUcKH7n7Yok+TCbEBXjpuggxVZ+gXY51rNVgsc10Zegewy6P3iB
	WnuhjVMqI5xjemRcGwH95yVl8K5GzdT2Vwp7jhjX5UvVbvwX3a6ewT2yUwGM8FVZ
	NrqdaZWNzXqNV+Xjj7CjyDCtNG5wihZcqwMayxo=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:subject:message-id:references
	:mime-version:content-type:in-reply-to; s=default; bh=LWQnFLYcz4
	WobguUCeJfs9Y1DhI=; b=ufCOChOTBXkwSO6fcnhAJ156bZ8r3a13jrlXexLLlg
	zVj1IwiO2Xu+B8bYxFZk9YEXnIvXHRFKCkLUlB2YbwRwopXtCiJyvtrzJwVQXtSc
	8J6rFCcI77dhVaK7o85nJn7aTA2BuRFGvA0YvW4Ad4qz+R0DCQBl29ZDPbh7qeQB
	w=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_40,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail.spocom.com
Date: Mon, 10 Aug 2015 13:31:01 -0700
From: Gary Johnson <garyjohn@spocom.com>
To: cygwin@cygwin.com
Subject: Re: vim 7.4 spontaneously changes the working file
Message-ID: <20150810203101.GA26950@phoenix>
Mail-Followup-To: cygwin@cygwin.com
References: <1439235082.1276404.352592657.537E1C55@webmail.messagingengine.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1439235082.1276404.352592657.537E1C55@webmail.messagingengine.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
X-IsSubscribed: yes

On 2015-08-10, grimpen wrote:
> i have just done a fresh reinstall of cygwin.
> 
> now vim is misbehaving:
> for every file i open with vim, vim usually changes the 1st character of
> the 1st line to "g".
> more exactly, if the 1st line is empty, vim makes no change,
> if the 1st line contains only blanks, vim changes the last blank to "g"
> if the 1st line contains blanks followed by a nonblank, vim changes the
> nonblank to "g"
> if the 1st line starts with a nonblank, vim changes the nonblank to "g"
> 
> running vim, the change happens right off;
> running view, vim announces 
>   W10: warning: changing a readonly file
> makes the change after 1 second, then on close announces
>   E45: 'readonly' option is set (add ! to override)
> 
> what can be the cause?
> 
> $ vim --version
> VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jun 29 2015 18:46:33)
> Included patches: 1-764
> Compiled by <cygwin@cygwin.com>
> Huge version without GUI.  Features included (+) or not (-):

I think the cause is a bug that was introduced at patch 757 and
resolved with patches 766 and 770.

The real solution is to update to some version of Vim at least as
recent as 7.4.770.  In the mean time, I think that you may be able
to work around the problem by adding this to your ~/.vimrc:

    set t_RB=

I think that will disable the feature added at Vim patch 7.4.757
that queries the terminal for its background color and will prevent
the problematic escape sequence from being sent to your terminal.

Regards,
Gary


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

