Allowing plugin to add cursor in custom Loc#3441
Conversation
|
There is another pull request where |
|
@niten94
I personally think it doesn't hurt to expose a function that creates a That being said, I don't mind having a dedicated function just to allow plugins to add a cursor to the buffer if you want it. |
So if later for some reason we want to change the way how it is done in the source code, we cannot just do that, since there are already plugins that already do the same, so we would need to update those plugins as well. Things are already quite messy due to the fact that micro's plugin system doesn't clearly define which APIs are supposed to be used by plugins (and thus are expected to preserve backward compatibility, etc) and which are only supposed to be used internally by micro. So let's not make it even messier. |
2d3bbff to
87930b6
Compare
|
@dmaluka |
It is very difficult to add new cursor from a plugin standpoint since
NewCursor()is not exposed.While this can be worked around by manipulating the cursor after calling
SpawnMultiCursorDown(), it is pretty much impossible to retain selections from previous cursors.This PR allows the plugin to add new cursor without any limitations