From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 60755 invoked by alias); 4 Feb 2020 01:56:12 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 60748 invoked by uid 89); 4 Feb 2020 01:56:12 -0000 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 Received: from conssluserg-05.nifty.com (HELO conssluserg-05.nifty.com) (210.131.2.90) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 04 Feb 2020 01:56:10 +0000 Received: from Express5800-S70 (ntsitm196171.sitm.nt.ngn.ppp.infoweb.ne.jp [125.0.207.171]) (authenticated) by conssluserg-05.nifty.com with ESMTP id 0141tsQw031585; Tue, 4 Feb 2020 10:55:54 +0900 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, 04 Feb 2020 01:56:00 -0000 From: Takashi Yano To: cygwin@cygwin.com Cc: Kevin Schnitzius 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 X-SW-Source: 2020-02/txt/msg00032.txt.bz2 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 -- 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