qvacua / vimr

VimR — Neovim GUI for macOS in Swift
https://twitter.com/VimRefined
MIT License
6.64k stars 218 forks source link

feat: compatible with chinese like input method #874

Closed SolaWing closed 2 years ago

SolaWing commented 2 years ago

this PR fixes following issues when I use vim with input method:

  1. use -, =, arrow key to select candidate. which shouldn't be handle by vim
  2. use left, right to move in marked text by word. which shouldn't be handle by vim directly
  3. pre-rendering marked text directly into UGrid cells, bypass vim key mapping system, only the finall insertText be inserted into vim. so vim map like jk to esc won't affect input method. and when input i in normal mode with input method, I can press to confirm it and only i will send to vim.

this PR should fixes #473 #592 #582 and may fixes #766 #771 #858

test against docs/notes-on-cocoa-text-input.md

qvacua commented 2 years ago

Thanks! Since I don't know how to use Chinese input, if Korean input still works, I'll merge it. 😄