Closed unclechu closed 6 years ago
I just realized that it doesn't act like this for everything, only when cursor is positioned after some unicode symbol. May be it counting columns by bytes and misses that not every symbol presented by same amount of bytes?
I have another issues with unicode symbols, I don't need to open new issue for that because as I see it's unicode issue in general, am I right?
nvim
TUI:
Oni:
Thanks for the detailed issue, @unclechu ! Having the screenshots is very helpful.
The autocompletion issue may be related to #376. There aren't any tests with that logic with Unicode strings, so it's possible that the logic being used there doesn't handle Unicode characters correctly.
The other issue seems related to the rendering strategy - it would be helpful to have a separate issue for that. The DOM renderer creates an element for strings, and it is sized to fit the string - if it doesn't measure the unicode characters correctly and the characters are wider, it can cause that wrapping behavior.
@unclechu , couple of follow-up questions for you:
init.vim
with the xnoremap
line that is problematic? I'm not able to repro these wrapping issues on Windows, but I'm wondering if it is specific to a font.editor.fontFamily
?Thanks for your help!
@extr0py
I'm assuming you're running on Fedora25, is that correct?
That is correct. Fedora 25 Workstation
Would you mind posting the init.vim with the xnoremap line that is problematic? I'm not able to repro these wrapping issues on Windows, but I'm wondering if it is specific to a font.
My config. But I didn't get which xnoremap
matters? Are you about autocompletion? But it's default Oni's mapping (^N/^P/Enter).
Are you using the default font with Oni or have you overridden it with editor.fontFamily?
I'm using Fira Code for ligatures, here is source of my ~/.oni/config.js
:
module.exports = {
"oni.useDefaultConfig": true,
"oni.loadInitVim": true,
"editor.fontSize": "12px",
"editor.fontFamily": "Fira Code",
"editor.completions.enabled": true,
"editor.fontLigatures": true,
"oni.hideMenu": true,
}
Do you have a document I can reproduce the completion behavior on? Unfortunately the youtube video did not work for me.
You could use minimal config that I put in topic to reproduce it. Just use this example:
foo → + bar
Where +
is your cursor position, type f
and in autocompletion menu choose foo
and then press Enter. I can reproduce it this way.
@unclechu, now that #376 and #453 have been fixed, would you mind re-compiling from the latest commit and see if you can still reproduce this issue?
@keforbes okay, will try soon.
@keforbes I still can reproduce it: https://youtu.be/jcHkspllgvE Commit: b5ea293321e525e5d91035409d9634435bae3b2a
@keforbes except text rendering, it looks like it's fixed.
This I cannot reproduce (fixed):
I believe this particular issue should be addressed with the autocompletion updates that came in 0.2.15. I'll close this for now, but let me know if you're still seeing the issue.
When cursor pointed on middle of the line and I press
Enter
to accept autocomplete suggestion it pastes text incorrectly.Minimal Neovim config to reproduce:
Short screencast that demonstrates the issue: https://youtu.be/LbiKwJZqaYs
:version
from Neovim:The Oni built from 1aa7f4126414d33810aa9499b8dce4e190e02f86.