[Bug] Custom symbols insert incorrect, if “\\” is "word_separators" value
Kristinita opened this issue · 3 comments
1. Summary
If I insert my custom symbol, slash \
insert for me.
2`. Settings
My User/UnicodeMath.sublime-settings
:
{
"symbols": {
"ballot_box": "\u2610",
"ballot_box_with_check": "\u2611"
}
}
Part of my User/Preferences.sublime-settings
:
"word_separators": "./\\()\"'-:,.;<>~!@#$%^*|+=[]{}`~?_"
3. Expected behavior
If I delete \\
into my word_separator
parameter:
I print \ballot_box
in test.md
file → I press Tab → ☐
insert for me.
4. Actual behavior
I print \ballot_box
in test.md
file → I press Tab → \☐
insert for me.
5. Steps to reproduce
I reproduce the problem in a version of Sublime Text without plugins and user settings.
I get actual behavior for my custom symbols, but I get expected behavior, if I delete \\
into my word_separator
parameter.
I change \u2610
to \\u2610
in my file User/UnicodeMath.sublime-settings
file → I get actual behavior.
6. Environment
Operating system and version:
Windows 10 Enterprise LTSB 64-bit EN
Sublime Text:
Build 3126
Thanks.
It works as expected if you write \ballot_box
and then press space (in this case UnicodeMath's command is called). But it leaves \
when you select completion item and press enter - in this case text is replaced by SublimeText (not plugin).
Seems, that SublimeText sees ballot_box
as two words (as long as _
is now word separator).
If this is acceptable solution for you, just don't use _
in symbol names:
{
"symbols": {
"ballotBox": "\u2610",
"ballotBoxWithCheck": "\u2611"
}
}
@mvoidex , thanks, it works for me! Please, write in README.MD
about it.
(I'm don't close this issue, because maybe it will be fixed.)
Thanks.
I'll close it, because i don't think it can be fixed within plugin