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:cc:subject:message-id:in-reply-to
	:references:mime-version:content-type:content-transfer-encoding;
	 q=dns; s=default; b=h70wtU1tJyAw9c0ksiWwB+Zo9eF9cN2WwfTJUK9nYol
	EJHQxEAcIAPFvqCA7elVY0NKkWvwphFSya0d6tnBqCktgfjBknPPfdgnoa3yuA7O
	wmtFXeaaCvYFwHVjTnahJ8H5NLtonCzpw8386mpDyq4RtTj3cmycocgNnloEvabE
	=
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:cc:subject:message-id:in-reply-to
	:references:mime-version:content-type:content-transfer-encoding;
	 s=default; bh=ArmA12BO2QA8K0WaNUbjC3911dc=; b=cD5VUBIPRcne7rbSa
	2CF1g6tcth1I5MzEr4YJh6HaJpXVL5BcneKTk/20GH84NAyrzQa2yq4qYd+aVJkU
	6400CS3uSbuP7MvZDEwaUQt3v9GBCvoD0QM1gXe1Typoa8SXWAfuGdjm8Gm9ejaY
	q2c/iH0FKU3EjMPdyA0UXqJBZU=
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-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=H*i:sk:5727696, HCc:D*yahoo.com, HContent-Transfer-Encoding:8bit
X-HELO: conssluserg-05.nifty.com
DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com 0141tsQw031585
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp;	s=dec2015msa; t=1580781354;	bh=HSEouAQA1GWJA6n70HLgG4nB2IErOiTM8AlSpLjA9Tc=;	h=Date:From:To:Cc:Subject:In-Reply-To:References:From;	b=YG97zssMYN9Sl5o9sF4Vhp1xtnN51Js2ltQCrb+9zNzj+3fosIuEBkBoO1MYL4cBS	 fh1Zf7znB72iKGm2l1oGNPgx7aX030MP8WkK49Ne/lqLBS5WWVMhrYu5iypjLD5+7W	 IdLWrdo2Ij3V2pgPM4/T98OejqTy2XG+jU41QPf1pPhB6+qBdGLdhKQbfWQyGuRhxz	 z2cZlaf9h5K27Zbgc2RuPwibvEs94xv8R78wpyW3K8Wqv9YAg3tTUITmTPw+5JEaO3	 XD8+LmGp6+gn1Q2gKY6p2EkLEk0oQrvTzuAJkUzS68dYTGEFlcuB0trdMyOPQxMcBg	 xfZYRDeV2gNCQ==
Date: Tue, 4 Feb 2020 10:56:01 +0900
From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin@cygwin.com
Cc: Kevin Schnitzius <kometes@yahoo.com>
Subject: Re: vim paste bug with compatible and showmatch turned on (seen for at least a year)
Message-Id: <20200204105601.ecd64b60ed38c6a444ff8658@nifty.ne.jp>
In-Reply-To: <572769636.1425652.1580766080816@mail.yahoo.com>
References: <572769636.1425652.1580766080816.ref@mail.yahoo.com>	<572769636.1425652.1580766080816@mail.yahoo.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-IsSubscribed: yes

On Mon, 3 Feb 2020 21:41:20 +0000 (UTC)
"Kevin Schnitzius via cygwin" wrote:
> 64-bit Cygwin, Win10, nothing special about my installation.
> 
> 
> Start vim cleanly inside a mintty window running bash (updated my installation today):
> /usr/bin/vim --clean -u /dev/nul test.txt
> 
> Insert the following string:
> "pIppp"
> 
> Copy that string into the paste buffer using the mouse and ctrl-insert.
> Insert the following string on the next line:
> "(char *) "
> 
> Then press shift-insert to paste. You should get:
> "(char *) pIppp"
> 
> This is normal behavior.
> 
> Press escape and then ":set sm cp" and press enter  Vim is now in compatible mode and showmatch is turned on.
> 
> Insert the following string on the next line:
> "(char *) "
> 
> Then press shift-insert to paste.  You should get the same string.  However, I get:
> "Ppp(char *)"
> 
> It seems like at least an ESC character is inserted, so the mode gets changed from insert to command.  This can be really destructive if you have a long buffer.
> 
> The showmatch mechanism is required to reproduce this bug.
> 
> Is this bug a Cygwin, vim, mintty, or something else bug?

This seems to be a upstream bug of vim. I tested several
version of vim and results are as follows.

8.0.707  in debian stretch OK
8.0.1567 in cygwin NG
8.1.1240 in cygwin NG
8.1.1401 in debian buster NG
8.1.1551 in debian buster (local build) NG
8.1.1772 in cygwin NG
8.2.100  in cygwin (local build) NG 

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

--
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

