Issue in Korean when EditorTab and CaretListener is used

已计划

Hello, I have a custom caret listener and a custom editorTabAction. When I press tab and the language is English, editorTabAction is called first and then the caretListener. When I am typing in Korean, the caretListener is called first and then the editorTabAction. My code relies on editorTab being called first. What might be the issue here? 

 

Is it reproducible on your end? Should I get the functionStack somehow and check in caretListener if editorTabAction will be called later and adjust my code to that? how to achieve this?

0

What exactly is your plugin doing and why does it depend on the order of the events?

0

Hello Yann, I have inlays in the editor that can be converted into code through a tab press. The inlays are disposed if caret moves or document changes. If the user presses tab, I want the tabAction to be overriden so that “/t” is not inserted. Using action = “editorTab”, I check if the editor has inlays and convert it into code and if they don't, I do the original implementation. This works perfectly in English. But in Korean, caretListener is listened first and inlays are cleared through caretPositionChanged. Then, when editorTab is called, it sees there are no inlays in the editor and calls the original implementation. 

0

How does user know/your plugin understand that you are “next" to inlay to be “converted” into code and TAB press will suddenly override default editor TAB press behavior? Why not add a custom action/popup to the inlay?

0

I have added a popup. I want to add Tab press to it as well. Suppose, the user types something, an inlay is generated and it is cleared if types something else or moves his cursor. 

0

Sorry but I have troubles imagining how your plugin works and how user interacts with it.

0

请先登录再写评论。