Open basuke opened 10 years ago
Wow, okay.
Could you open the console and run sublime.log_commands(True)
and let me know what it outputs when you press enter at the end of the line?
Sure.
command: reindent
command: jsdocs
command: insert_snippet {"contents": "\n${TM_CURRENT_LINE/^\\s*(\\*\\s*).*$/$1/}"}
command: insert_snippet {"contents": "\n${TM_CURRENT_LINE/^\\s*(\\*\\s*).*$/$1/}"}
command: move {"by": "lines", "forward": false}
Thanks for that. I have no idea how this is causing that bug though. You can see that the command is only supposed to insert text (a new line, followed by as many spaces as there are to the right of the *
).
...though looking at your gif there, the characters are selected when you press enter. On my machine, even outside of a docblock, pressing enter when text is selected deletes that text. Do you think that might be the cause here?
I know it's hard to believe but there are difference between selected text and Input Method candidate selection state. I started trying to describe about that, but I gave up :(
I will take a look inside the code and will send a pull request once I fix this. If this is caused by the Sublime's text handling, I'll send a report to them. Can you keep open this issue until then? Maybe in a week.
Sure thing. Let me know if I can help in some way.
Hi guys, thanks for the great plugin : ) But I found it happend when I'm typing chinese. (The way I type just like japanese) Can you fix this? Again, thank you guys!
I'm running into the same issue, and thought I'd share my findings. Sublime has an issue with foreign text input, in that it catches the 'Enter' or 'Tab' keystrokes intended for conversion, and executes commands before the text has been finalized/converted. I'm assuming that before being converted, the text is not actually visible to the program, and so when a command is sent, the input is blank.
Here's what the input looks like when using sublime.log_input(True)
:
This also happens in the search box when pressing enter.
The only ways to fix the issue that I've seen involve remapping the command to a different key binding than enter
, or commenting it out:
https://gist.github.com/koizuss/4521934
http://qiita.com/uskiita/items/e0a39d72445db7c78e21
These aren't really ideal solutions for me, so I'll probably just wait to use this plugin until the guy who makes Sublime starts listening to his international users.
Bump for this issue. I'm facing the same problem while typing chinese, seems like IME doesn't work well with jsdocs plugin. To make it short, I couldn't hit enter while inputting the comment blocks, or the pinyin candidates will be inserted, instead of IME specific input results, like mixed chinese and english input.
Inputting Chinese also has this problem. Is it fixed? Or is there some way to work around?
I have to describe about Japanese text input first. We need special way to type Japanese text using keyboard because there are too few keys available to enter thousands of Kanji characters. Basically we type "Hiragana", then system's Input Method analyse the input and guesses what the Kanji characters the user requested. Then we hit return to finalise the candidate texts system supplies.
With Docblockr, while in the comment doc block, when I hit return to choose some Kanji character, every text after "* " will be erased and go to new line. It looks like extension treating the Input Method key event as a regular key event.