[PATCH] Cygwin: console: Do not use memcmp() to compare INPUT_RECORD.

2022-03-18 Thread Takashi Yano
- Using memcmp() to compare structure such as INPUT_RECORD is not correct manner because padding may not be initialized. This patch stops to use memcmp() for comparison of INPUT_RECORD. --- winsup/cygwin/fhandler_console.cc | 41 --- 1 file changed, 38

[PATCH] Cygwin: console: Ignore dwControlKeyState in event comparison.

2022-03-18 Thread Takashi Yano
- dwControlKeyState also may be null'ed on WriteConsoleInputW(). Therefore ignore it in event comparison as well as wVirtualKeyCode and wVirtualScanCode. --- winsup/cygwin/fhandler_console.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

Re: xterm (or x11) pastes are highlighted

2022-03-18 Thread Andy Koppe
On Fri, 18 Mar 2022 at 07:23, n952162 wrote: > > Am 18.03.2022 um 00:22 schrieb Andy Koppe: > > On Thu, 17 Mar 2022 at 20:32, René Berber wrote: > >> On 3/17/2022 1:03 PM, n952162 wrote: > >> > >>> Does anyone know how I can disable the highlighting that occurs when I > >>> copy and paste in

[PATCH] Cygwin: console: Fix typeahead key swapping which still occurs.

2022-03-18 Thread Takashi Yano
- The commit "Cygwin: console: Improve the code to avoid typeahead key swapping." did not solve the problem enough. Two unexpected things happen. (1) wVirtualKeyCode and wVirtualScanCode of readback key event may be null'ed even if they are not zero on WriteConsoleInputW().

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-18 Thread Takashi Yano
On Fri, 18 Mar 2022 15:04:31 +0200 Orgad Shaneh wrote: > On Fri, Mar 18, 2022 at 2:15 PM Takashi Yano wrote: > > Thanks. I can reproduce the issue. I think I found the cause. > > The two unexpected things happen. > > > > (1) wVirtualKeyCode and wVirtualScanCode of readback key event may > >

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-18 Thread Orgad Shaneh
On Fri, Mar 18, 2022 at 2:15 PM Takashi Yano wrote: > > On Fri, 18 Mar 2022 13:21:00 +0200 > Orgad Shaneh wrote: > > > Git for Windows > > > > Were you able to reproduce? > > > > I found an easier way to reproduce, which works almost every time. > > > > It still happens only on Git Bash, and not

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-18 Thread Takashi Yano
On Fri, 18 Mar 2022 13:21:00 +0200 Orgad Shaneh wrote: > > Git for Windows > > Were you able to reproduce? > > I found an easier way to reproduce, which works almost every time. > > It still happens only on Git Bash, and not on MSYS2 MINGW64, although > I use the same dll in both. I have no

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-18 Thread Orgad Shaneh
On Fri, Mar 18, 2022 at 8:32 AM Orgad Shaneh wrote: > > On Fri, Mar 18, 2022, 8:31 AM Takashi Yano wrote: >> >> On Fri, 18 Mar 2022 07:57:27 +0200 >> Orgad Shaneh wrote: >> > I'm using the dll that was built here: >> > https://github.com/git-for-windows/msys2-runtime/actions/runs/218081 >> >

Re: xterm (or x11) pastes are highlighted

2022-03-18 Thread n952162
Am 18.03.2022 um 00:22 schrieb Andy Koppe: On Thu, 17 Mar 2022 at 20:32, René Berber wrote: On 3/17/2022 1:03 PM, n952162 wrote: Does anyone know how I can disable the highlighting that occurs when I copy and paste in xterm? Escape sequences are added to achieve that and sometimes they're

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-18 Thread Orgad Shaneh
On Fri, Mar 18, 2022, 8:31 AM Takashi Yano wrote: > On Fri, 18 Mar 2022 07:57:27 +0200 > Orgad Shaneh wrote: > > I'm using the dll that was built here: > > https://github.com/git-for-windows/msys2-runtime/actions/runs/218081 > > for my PR:

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-18 Thread Takashi Yano
On Fri, 18 Mar 2022 07:57:27 +0200 Orgad Shaneh wrote: > I'm using the dll that was built here: > https://github.com/git-for-windows/msys2-runtime/actions/runs/218081 > for my PR: https://github.com/git-for-windows/msys2-runtime/pull/43 > > I can reproduce in msys2-runtime repo, but it's

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-18 Thread n952162
On 3/17/22 19:40, Orgad Shaneh wrote: On Fri, Mar 11, 2022 at 11:36 PM Takashi Yano wrote: I looked into this problem and found the cause. This seems to be due to a bug of fsync(). Cygwin's fsync() flushes the console input buffer unlike linux. I will propose a patch for this issue. --

Re: xterm (or x11) pastes are highlighted

2022-03-18 Thread n952162
On 3/18/22 00:22, Andy Koppe wrote: On Thu, 17 Mar 2022 at 20:32, René Berber wrote: On 3/17/2022 1:03 PM, n952162 wrote: Does anyone know how I can disable the highlighting that occurs when I copy and paste in xterm? Escape sequences are added to achieve that and sometimes they're not being