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
Minibuffer input ignored for CJK locales #831
Comments
I believe this is a duplicate of #324. Can you confirm? |
As far as I can tell, this is a separate issue. All input (except dash) is ignored, including Latin characters. Note that the |
Indeed, I made the wrong assumption reading your initial post.
Could you run nyxt with the --verbose flag in a shell, open the
minibuffer, then press a latin key and report the output?
It'd be great if you could highlight the exact output that's generate
upon the keypress.
|
Comparing against
Here is the entire log: nyxt.log. |
I think the culprit is `printable-p`: for some reason it returns nil
with CJK.
Here the code:
```
(defmethod printable-p ((window gtk-window) event)
"Return the printable value of EVENT."
;; Generate the result of the current keypress into the dummy
;; key-string-buffer (a GtkEntry that's never shown on screen) so that we
;; can collect the printed representation of composed keypress, such as dead
;; keys.
(gtk:gtk-entry-im-context-filter-keypress (key-string-buffer window) event)
(when (<= 1 (gtk:gtk-entry-text-length (key-string-buffer window)))
(prog1
(match (gtk:gtk-entry-text (key-string-buffer window))
;; Special cases: these characters are not supported as is in KEY values.
;; See `self-insert' for the reverse translation.
(" " "space")
("-" "hyphen")
(character character))
(setf (gtk:gtk-entry-text (key-string-buffer window)) ""))))
```
So either gtk-entry-im-context-filter-keypress never inserts the event in
key-string-buffer, or `gtk:gtk-entry-text' returns nil.
Can anyone think of something else?
|
I cannot think of anything else. I think it is the gtk:gtk-entry-text which is returning nil. Do CJK locales have any problems in any other GTK programs? |
This is the first time I have encountered anything like this, having run with |
The above function is a rather unique hack, so it is not a big surprise :/
|
I have had other users confirm that it now works! |
Thanks for working on this! The issue reported here is fixed: Nyxt works as expected with |
Overview
When
LANG
is set to an existing CJK, input in the minibuffer is almost completely ignored. Interestingly, the keys that do work are<enter>
, arrow navigation, and dash (-
).I have confirmed this with the following locales:
ja_JP.utf8
,ko_KR.utf8
, andzh_TW.utf8
.In addition, I checked various other locales, and those seem to be working just fine.
Note that if the CJK locale doesn't exist on your system, then nyxt correctly falls back to LANG=C.
Reproduction
In my case, nxyt is installed via guix. The following invocation pairs down the a minimal environment capable of demonstrating the issue:
Version Info
Running with an unset
LANG
lets me grab the following fromcopy-system-information
:The text was updated successfully, but these errors were encountered: