You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the process of working on a Vim plugin for VSCode I've run into a number of areas where I need a little bit of API help. Apologies if any of my suggestions already exist!
One thing that I would really like is an onClick event. I know that we have a way to see if selections are changed, but the difficulty is that the Vim plugin changes the selections a lot, which makes it difficult to know who changed the selections - me or you. onClick would solve this problem.
Thanks. I understand mouse as in 'user selected something' explicitly (not because of undo/redo, setting new content etc). Will make the changes early August such that we have enough time to fine tune
Grant Mathews (@johnfn) I have just pushed the change to master. It would be great if you can give it try with tomorrows insider build and give feedback
Johannes Rieken (@jrieken) I've played with this new API change and most cases work perfectly. The only problem I've run into right now is sometimes TextEditorSelectionChangeKind is undefined, for example, when you insert a code snippet and all placeholders are selected, we receive a selection change with TextEditorSelectionChangeKind set as undefined. Any ideas?
Activity
[-]Feature request: OnClick[/-][+]API request: OnClick[/+]jrieken commentedon Jun 24, 2016
Not sure about
onClickbut we could enrich theTextEditorSelectionChangeEventwith some sort of hintjohnfn commentedon Jun 24, 2016
Yeah, that would be great.
alexdima commentedon Jun 28, 2016
fyi Johannes Rieken (@jrieken) - there is a
ICursorSelectionChangedEvent.source-'mouse'will be set there if the mouse handler or touch handler caused it. https://github.com/Microsoft/vscode/blob/master/src/vs/editor/browser/view/viewController.ts#L71[-]API request: OnClick[/-][+]Add 'Reason' to SelectionChangeEvent[/+]jrieken commentedon Jul 13, 2016
alexandrudima I also see
ICursorSelectionChangedEvent.reason. How are bothreasonandsourcerelated? Willsourcebe set when reason isPaste?10 remaining items
johnfn commentedon Jul 26, 2016
Johannes Rieken (@jrieken) ah, super sorry! I have difficulty sorting through all my Github notifications. 😞
mouseand/oronClickare by far the highest priority. The others are welcome if possible.jrieken commentedon Jul 26, 2016
Thanks. I understand
mouseas in 'user selected something' explicitly (not because of undo/redo, setting new content etc). Will make the changes early August such that we have enough time to fine tunejohnfn commentedon Jul 26, 2016
Exactly. Any click or release event, and explicitly not anything else.
add TextEditorSelectionChangeKind when emitting selection change event,
jrieken commentedon Aug 12, 2016
Grant Mathews (@johnfn) I have just pushed the change to master. It would be great if you can give it try with tomorrows insider build and give feedback
don't push code without tests... #8093
johnfn commentedon Aug 12, 2016
Johannes Rieken (@jrieken) ooh, this is a big one. I have been waiting on this for a while. Thanks!
jrieken commentedon Aug 15, 2016
Thanks and happy coding
rebornix commentedon Sep 20, 2016
Johannes Rieken (@jrieken) I've played with this new API change and most cases work perfectly. The only problem I've run into right now is sometimes
TextEditorSelectionChangeKindisundefined, for example, when you insert a code snippet and all placeholders are selected, we receive a selection change withTextEditorSelectionChangeKindset asundefined. Any ideas?jrieken commentedon Sep 21, 2016
That's the defined behaviour - there is no guarantee that the source is always known