| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-Original-To: | cygwin AT cygwin DOT com |
| Delivered-To: | cygwin AT cygwin DOT com |
| DMARC-Filter: | OpenDMARC Filter v1.3.2 sourceware.org DB8F3386F432 |
| Authentication-Results: | sourceware.org; |
| dmarc=none (p=none dis=none) header.from=towo.net | |
| Authentication-Results: | sourceware.org; spf=none smtp.mailfrom=towo AT towo DOT net |
| Subject: | Re: [ANNOUNCEMENT] Updated: mintty 3.1.6 |
| To: | cygwin AT cygwin DOT com |
| References: | <announce DOT 20daae52-65b7-f665-699d-37fe9c19bc5e AT towo DOT net> |
| <20200522182257 DOT 068752a1be64dd35f85920ba AT nifty DOT ne DOT jp> | |
| <769b26a3-51a8-0d2c-871f-fd5e6bf793eb AT towo DOT net> | |
| <20200522200131 DOT e76be21d39ad5d7b836c843a AT nifty DOT ne DOT jp> | |
| <20200522215800 DOT 8bedb2907eacbf1881102793 AT nifty DOT ne DOT jp> | |
| <20200522225405 DOT f8369e7698766d8633ba87de AT nifty DOT ne DOT jp> | |
| <20200522235632 DOT 16c7c562d74050b8f1e7c705 AT nifty DOT ne DOT jp> | |
| From: | Thomas Wolff <towo AT towo DOT net> |
| X-Tagtoolbar-Keys: | D20200522221615624 |
| Message-ID: | <0736b061-48a4-8124-eb81-5827ba3c0b08@towo.net> |
| Date: | Fri, 22 May 2020 22:16:15 +0200 |
| User-Agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 |
| Thunderbird/68.8.0 | |
| MIME-Version: | 1.0 |
| In-Reply-To: | <20200522235632.16c7c562d74050b8f1e7c705@nifty.ne.jp> |
| X-Provags-ID: | V03:K1:F2qhLQTV6KWq/Pn7hiKzReNg2Tmw74cf81ib2U7XYqLYgAF2n6p |
| IGExfRqajLWC3iocG9+CL2BZkutr+lc6Do35lfovBazT9x9Ti4T1+2R22540kElbHnahggD | |
| nDcObZp0OBkUw5kmxS1vMUz9jw5dj+C+WqXpj+TTvI90kHQq+IkUmCjcyluScy8kcdimJ9J | |
| KVbXbzD+JYh4OHLTseLkA== | |
| X-UI-Out-Filterresults: | notjunk:1;V03:K0:+TV2CEqgp1k=:jM4aj4FrbXPuRcFgcXwLnk |
| g/vMN6gF8/rhjjUhumw7f/2xxHxsTsQd74bVu8peYi6dL2T9Mw1fNE8yaCLiu80KGxpYoRlhB | |
| Vciy3yO8Ya7JD4G5F3KhOcYKRn5N67+1R5PCOgjUvBSCEMpUrBBd1skzyAoensgrNiogCPJNk | |
| yO77r3tMvuKd54LPoVCdJGPQwUkzdDkXRCHq4yCzn+nrg8g7rwF1M7seUFpM5XfYHJ8JIc0ee | |
| TJ6xpgpm0gZw3QXfTLUBK8KPlw1Sd4TTBV/97aUxtn8zDbP45HJbdcc52k6ki9A50tnr7Ki0w | |
| 7LwWHvg67LJL4Ljagk7K9pZnpO6iQhJakDchPcl4WnfgSICz2fVxT20Uy+nwRtCH2WzcPL8/v | |
| wb2HLaB74EsSpPwz4c+M7qD7CSqvgi2UpVOJi2K1fJSdNg1P19txZVcXu8vvLphv/poIkzSaI | |
| XPikGjs1m/f5MReBzYwzmHa+Zbp6REQV3SP4Z8B0LplyzkCJkM4OWNLhRkt/xfQzn8wVrNuqu | |
| 14sX55EGApywc+tfoNDC2f0YvIeuMzulLDJ/e4D5AodgKLckX+CVYGiUxgpyRMMA6cym6sqyU | |
| BqEcowgKzW/CGD94VHpQDK0IjGDt8R4wwQTS7BY0bDc84Kn5tvLlfyNf0U9oCHp7vv5QZapOt | |
| wmP34idwx2dNrB9Zo78843kVfM5CaGsEnl8Je46ER9nFdoUrg3avC8Zwjm/fmccGE/z6DEFTO | |
| L5rK+fsOukCbrCqRTdi5m3s5grkroHWZEmLeID1B7a9AChT0B17mM8LFxsv++Fv/kCNqZcDHr | |
| nLCm5+5hteC2rkWaJZJSvko2XHacLhv4ILvxjPgpv+3ChUCNm0= | |
| X-Spam-Status: | No, score=-8.7 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, |
| KAM_LAZY_DOMAIN_SECURITY, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, | |
| RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, | |
| TXREP autolearn=no autolearn_force=no version=3.4.2 | |
| X-Spam-Checker-Version: | SpamAssassin 3.4.2 (2018-09-13) on |
| server2.sourceware.org | |
| X-BeenThere: | cygwin AT cygwin DOT com |
| X-Mailman-Version: | 2.1.29 |
| List-Id: | General Cygwin discussions and problem reports <cygwin.cygwin.com> |
| List-Unsubscribe: | <http://cygwin.com/mailman/options/cygwin>, |
| <mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe> | |
| List-Archive: | <https://cygwin.com/pipermail/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-request AT cygwin DOT com?subject=help> |
| List-Subscribe: | <http://cygwin.com/mailman/listinfo/cygwin>, |
| <mailto:cygwin-request AT cygwin DOT com?subject=subscribe> | |
| Errors-To: | cygwin-bounces AT cygwin DOT com |
| Sender: | "Cygwin" <cygwin-bounces AT cygwin DOT com> |
| X-MIME-Autoconverted: | from base64 to 8bit by delorie.com id 04MKGoSJ002895 |
Am 22.05.2020 um 16:56 schrieb Takashi Yano via Cygwin:
> On Fri, 22 May 2020 22:54:05 +0900
> Takashi Yano via Cygwin <cygwin AT cygwin DOT com> wrote:
>> On Fri, 22 May 2020 21:58:00 +0900
>> Takashi Yano via Cygwin <cygwin AT cygwin DOT com> wrote:
>>> On Fri, 22 May 2020 20:01:31 +0900
>>> Takashi Yano via Cygwin <cygwin AT cygwin DOT com> wrote:
>>>> On Fri, 22 May 2020 12:14:43 +0200
>>>> Thomas Wolff wrote:
>>>>> Hi Takashi,
>>>>>
>>>>> Am 22.05.2020 um 11:22 schrieb Takashi Yano via Cygwin:
>>>>>> Hi Thomas,
>>>>>>
>>>>>> On Thu, 21 May 2020 19:41:27 +0200
>>>>>> Thomas Wolff wrote:
>>>>>>> I have uploaded mintty 3.1.6 with the following changes:
>>>>>>>
>>>>>>> Window handling
>>>>>>> Â * Fixed resource leak when displaying images (#995).
>>>>>>> Â * Fixed crash condition on keyboard auto-repeat (#996). (Apologies
>>>>>>> for this one.)
>>>>>>>
>>>>>>> The homepage is at http://mintty.github.io/
>>>>>>> It also links to the issue tracker.
>>>>>> After v3.1.5, the key repeat rate becomes almost halfened.
>>>>>> Is this behaviour by design?
>>>>>>
>>>>>> The key repeat rate is about 30 chars/sec in v3.1.4, but
>>>>>> it is 15 chars/sec in v3.1.5 and v3.1.6.
>>>>>>
>>>>>> It is little bit flustrating in editor cursor movement.
>>>>>>
>>>>> I've uploaded a commit: keyboard auto-repeat handling is now unaffected
>>>>> by default
>>>>> Explanation: the new auto-repeat rate limitation with a maximum of 30
>>>>> cps (following the DECARR sequence of VT520) was effectively slowing
>>>>> down keyboards; I had the impression 30 would be enough... sorry
>>>> I also think 30 cps would be enough, however, the key repeat rate
>>>> is not as setting by ESC[n-p sequence. Measured results in v3.1.6
>>>> are as follows. Actual key repeat rate does not increase linearly.
>>>>
>>>> ^[[1-p : 1 cps
>>>> ^[[2-p : 2 cps
>>>> ^[[3-p : 3 cps
>>>> ^[[5-p : 4.7cps
>>>> ^[[10-p : 8.2cps
>>>> ^[[20-p : 14.8cps
>>>> ^[[30-p : 16.3cps
>>> Revising code in wininput.c as follows resolve this problem.
>>>
>>> static LONG last_key_time = 0;
>>> static LONG last_message_time = 0;
>>>
>>> LONG message_time = GetMessageTime();
>>> LONG last_key_time_new = message_time;
>>> if (repeat) {
>>> #ifdef auto_repeat_cursor_keys_option
>>> switch (key) {
>>> when VK_PRIOR ... VK_DOWN: do not return...;
>>> }
>>> #endif
>>> if (!term.auto_repeat)
>>> return true;
>>> if (message_time - last_message_time < 2*1000/term.repeat_rate)
>>> /* Key repeat seems to be continued. */
>>> last_key_time_new = last_key_time + 1000/term.repeat_rate;
>>> last_message_time = message_time;
>>> if (message_time - last_key_time < 1000/term.repeat_rate)
>>> return true;
>>> }
>>> last_key_time = last_key_time_new;
>>>
>>> ^[[1-p : 1 cps
>>> ^[[2-p : 2 cps
>>> ^[[3-p : 3 cps
>>> ^[[5-p : 5 cps
>>> ^[[10-p : 9.7cps
>>> ^[[20-p : 19.4cps
>>> ^[[30-p : 29.0cps
>> The simplified following code also work as expected.
>> Protection for division by 0 is added as well.
>>
>> static LONG last_key_time = 0;
>>
>> LONG message_time = GetMessageTime();
>> if (repeat) {
>> #ifdef auto_repeat_cursor_keys_option
>> switch (key) {
>> when VK_PRIOR ... VK_DOWN: do not return...;
>> }
>> #endif
>> if (!term.auto_repeat)
>> return true;
>> if (term.repeat_rate &&
>> message_time - last_key_time < 1000 / term.repeat_rate)
>> return true;
>> }
>> if (term.repeat_rate &&
>> message_time - last_key_time < 2*1000 / term.repeat_rate)
>> /* Key repeat seems to be continued. */
>> last_key_time += 1000 / term.repeat_rate;
>> else
>> last_key_time = message_time;
> Sorry again and again. After all, the code above doesn't work
> as expected. I would like to propose the code below.
>
> static LONG last_key_time = 0;
>
> LONG message_time = GetMessageTime();
> if (repeat) {
> #ifdef auto_repeat_cursor_keys_option
> switch (key) {
> when VK_PRIOR ... VK_DOWN: do not return...;
> }
> #endif
> if (!term.auto_repeat)
> return true;
> if (term.repeat_rate &&
> message_time - last_key_time < 1000 / term.repeat_rate)
> return true;
> }
> if (term.repeat_rate && repeat &&
> message_time - last_key_time < 2*1000 / term.repeat_rate)
> /* Key repeat seems to be continued. */
> last_key_time += 1000 / term.repeat_rate;
> else
> last_key_time = message_time;
Thank you, I've uploaded that version.
Thomas
--
Problem reports: https://cygwin.com/problems.html
FAQ: https://cygwin.com/faq/
Documentation: https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |