X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.4 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <1299EF3181B10F479D85C328013285240331C4CE@THEZE.intra.cea.fr> References: <1299EF3181B10F479D85C328013285240331C4CE AT THEZE DOT intra DOT cea DOT fr> Date: Wed, 4 Aug 2010 19:46:42 +0100 Message-ID: Subject: Re: About mouse selection in a cmd console From: Andy Koppe To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 2 August 2010 12:05, JOHNER Jean 066030 wrote: > Note that, when 'Quick Edit' is not checked, right > click to access to "Mark" is not enabled when you launch Cygwin.bat > (why?). Because Cygwin's console driver sets the ENABLE_MOUSE_INPUT flag on the console (using SetConsoleMode(), see also http://msdn.microsoft.com/en-us/library/ms686033.aspx). This flag ensures that mouse events, including right clicks, are placed into the console input buffer rather than triggering window actions. That's in case an application activates xterm-style mouse reporting. Yep, the Cygwin console driver does indded support that, but vim doesn't know that, so you need to tell it via .vimrc: set mouse=a set ttymouse=xterm2 > 3/ Launch Cygwin.bat in a 'Quick Edit' cmd console, put "set mouse=a" in > .vimrc then type vi file1. > Result: file1 is opened. When you click somewhere in the file, the vim > cursor is NOT moved. In the same way, you cannot select a word to delete > it nor select a range of lines to do some specific operation. That is > the reason why I wrote that mouse selection does not work in a bash cmd > console. Apparently quick edit mode overrides mouse input mode, so the console driver never gets to see those mouse events. > 4/ If you have Window vim installed (in C:\Program > Files\vim\vim72\vim.exe) and launch a cmd console (without launching > Cygwin.bat), using vim file1 opens file1. Clicking somewhere DOES move > the vim cursor. With quick edit mode enabled? It might be (temporarily) disabling that. Andy -- 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