New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSC 112 Can't Work When IME is Opened #903
Comments
Works here. |
Did you set up option SuppressOSC? |
@mintty Thanks for quick testing, I have tried if launch It seems both of Anyway, it prove that mintty support OSC 112 correctly, if you haven't any other comments I will close this issue, thanks a lot. |
I tried in Msys2 and could not reproduce the issue there either. |
@mintty Above phenomenon is found on my company laptop(Win10). PC(Win10): OSC 112 doesn't work no matter how to launch mintty. |
Retried with Msys2 on Windows 10; not reproduced. |
Strange, my config file is listed below.
|
dracula theme file is listed below.
|
That answers my question about a SuppressOSC setting (assuming you have no other config file that also gets loaded, e.g. in $APPDATA/mintty). |
Maybe like you said, it is caused by my environment, today I can't reproduce it on my company laptop(Windows 10), I found the |
I have done 2 tests it again on my home PC(Windows 10). 1. Log Output of minttyPrerequisite
Log File Content2. Install Msys2 Freshly and TestPrerequisite
ResultThe green cursor color still can't be reset. SummaryOn my home PC, this issue can be reproduced stably no matter how to launch the mintty, if anyone have the same OS version, please help to confirm. |
You seem to be having a wider cursor, maybe by system configuration. Could that have an impact? |
As it occurs only in Msys2 for you, and they have a patched version, there is one more idea to suggest: |
@mintty Thanks for the detailed instruction, I have setup the compile and debug environment, I can debug mintty using gdb now. According to your instructions, I change macro "dont_debug_cursor" to "debug_cursor", from the printed information, after command
I step into the function "do_cmd", OSC 12 escape sequence is received and parsed correctly, and below line are called. Line 3195 in 43a0593
Line 4150 in 1bc1b70
I think it is not very difficult to find the root cause of this issue, because Line 2715 in 1cf71c7
won't get the correct color, so just check the codes between cursor reset and cursor drawing may can find the root cause, but today I haven't more time, maybe I will do it tomorrow or next week. |
The root cause is the IME, drawing code of cursor will get Line 2690 in 1cf71c7
But the OSC 112 only reset the CURSOR_COLOUR_I .Line 3195 in 1cf71c7
Line 3099 in 1cf71c7
Line 4150 in 1cf71c7
@mintty Many methods can fix this issue, do you think which is the best? Add do_colour_osc(false, IME_CURSOR_COLOUR_I, true); in when 112: do_colour_osc(false, CURSOR_COLOUR_I, true); or reset IME_CURSOR_COLOUR implicitly in function win_set_colour like below?
It seems that
|
Thanks for the analysis.
Also the global variable should get an explicit initial value:
|
Patch applied, thank you. |
And even the current patch seems to be wrong. Sorry for not noticing earlier. |
Uploaded a tweak about interaction with setting |
@mintty Thank you for helping change it to
Just curiosity, have anybody really have a requirement that use another different colour for cursor when IME is open? For me, maybe there is only one possible benefit to use a different colour for IME cursor, that is reminding me I forgot close the IME, because there isn't situation which will need input Chinese in terminal. |
I am not familiar with using input methods but I guess not all do display an overlay input area as in your screenshot, so the cursor colour may be a useful indication. |
@mintty Got it, I don't know other language input methods, but basic each Chinese input methods have these overlay input area. |
I have the habit to close issues after the next release, for better documentation. Thank you. |
Released 3.0.3. |
From the change log here, the OSC sequences 110/111/112 are supported from 2.7.5, I have downloaded and compiled version 2.7.5, the OSC sequences 112 work well.
But the OSC sequence 112 can't work at 2.9.0 and 3.0.2, I only test OSC sequence 112, I don't know whether 110/111 work well or not.
The test sequences are listed below.
The text was updated successfully, but these errors were encountered: