Merge pull request #3675 from ethereum/yann300-patch-51

fix adding breakpoint
bumpLibs11May
yann300 2 years ago committed by GitHub
commit 00be427145
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      libs/remix-ui/editor/src/lib/remix-ui-editor.tsx

@ -556,7 +556,10 @@ export const EditorUI = (props: EditorUIProps) => {
reducerListener(props.plugin, dispatch, monacoRef.current, editorRef.current, props.events)
props.events.onEditorMounted()
editor.onMouseUp((e) => {
if (e && e.target && e.target.toString().startsWith('GUTTER')) {
// see https://microsoft.github.io/monaco-editor/typedoc/enums/editor.MouseTargetType.html
// 2 is GUTTER_GLYPH_MARGIN
// 3 is GUTTER_LINE_NUMBERS
if (e && e.target && (e.target.type === 2 || e.target.type === 3)) {
(window as any).addRemixBreakpoint(e.target.position)
}
})

Loading…
Cancel
Save