Skip to content

The input box cannot input Chinese characters. #5199

@conifercone

Description

@conifercone

Describe the bug

On Windows (non-WSL), Chinese characters cannot be input or pasted into the commit message input box in lazygit.
English input and paste work correctly, but any Chinese input fails.

When using a Chinese IME (Microsoft Pinyin), pressing Enter during composition sometimes results in an unexpected uppercase K character being inserted instead of confirming the text.

This issue only occurs inside lazygit’s commit message input box.
Chinese input works normally in PowerShell 7 and Windows Terminal outside of lazygit.


To Reproduce

  1. Open Windows Terminal

  2. Start PowerShell 7 (not WSL)

  3. Run lazygit

  4. Stage any file

  5. Press c to open the commit message input box

  6. Switch to a Chinese IME (e.g. Microsoft Pinyin)

  7. Try to:

    • Type Chinese characters, or
    • Paste Chinese text from clipboard

Observed behavior:

  • Chinese characters do not appear
  • Pressing Enter during IME composition may insert an uppercase K
  • Pasting English text works, but pasting Chinese text does nothing

Expected behavior

Chinese characters should be inputtable and pasteable in the commit message input box, the same way English text works.

IME composition should correctly commit the composed Chinese text when pressing Enter.


Screenshots

N/A (text input issue)


Version info

# please replace with actual output
lazygit version 0.58.0

Terminal info

  • OS: Windows 10 / Windows 11
  • Terminal: Windows Terminal (latest stable)
  • Shell: PowerShell 7
  • WSL: Not used
  • Input Method: Microsoft Pinyin (Chinese IME)

Additional context

  • Chinese input works correctly in:

    • PowerShell 7 prompt
    • Other console applications
  • The issue is limited to lazygit’s commit message input box

  • Copy & paste behavior:

    • English text: works
    • Chinese text: does not work

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions