Skip to content
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

IndexError Occurs on Single Emoji Input in AI Diffusion Prompt #1592

Closed
na-navi opened this issue Feb 7, 2025 · 1 comment
Closed

IndexError Occurs on Single Emoji Input in AI Diffusion Prompt #1592

na-navi opened this issue Feb 7, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@na-navi
Copy link

na-navi commented Feb 7, 2025

Environment

  • OS Language: Japanese
  • Text Input Method: Microsoft IME / Google Japanese Input
  • Krita UI Language: 日本語

Steps to Reproduce

  1. Launch Krita 5.2.6 with AI Diffusion 1.31.1
  2. Click on text prompt input field
  3. Insert any single emoji using either:
    • Keyboard input (Win + . → select 🧠/🔥)
    • Copy-paste (Ctrl+V)

Actual Result
An immediate error occurs with the following message:
IndexError: string index out of range

@Acly Acly added the bug Something isn't working label Feb 7, 2025
Acly added a commit that referenced this issue Feb 7, 2025
…1592

- eg. emojis
- QTextCursor position counts 16bit-chars
@na-navi
Copy link
Author

na-navi commented Feb 8, 2025

Confirmation of Fix

Thank you for addressing this issue! After applying commit 30755ba to ai_diffusion/ui/autocomplete.py, I can confirm:

  • 🎉 Emoji completion now works properly (tested with 🖌️🚀🌈)
  • 🚫 No more IndexError: string index out of range exceptions
  • 📝 Multi-byte Unicode text handling behaves as expected

Appreciate the quick fix!

@na-navi na-navi closed this as completed Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants