do not select line if gutter click is on breakpoint margin
This commit is contained in:
parent
bce8bb378a
commit
a6e2d756ee
1 changed files with 7 additions and 1 deletions
|
|
@ -38,17 +38,23 @@
|
|||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
var dom = require("../lib/dom");
|
||||
|
||||
function GutterHandler(mouseHandler) {
|
||||
var editor = mouseHandler.editor;
|
||||
|
||||
mouseHandler.editor.setDefaultHandler("guttermousedown", function(e) {
|
||||
if (e.domEvent.target.className.indexOf("ace_gutter-cell") == -1)
|
||||
var target = e.domEvent.target;
|
||||
if (target.className.indexOf("ace_gutter-cell") == -1)
|
||||
return;
|
||||
|
||||
if (!editor.isFocused())
|
||||
return;
|
||||
|
||||
var padding = parseInt(dom.computedStyle(target).paddingLeft);
|
||||
if (e.x < padding + target.getBoundingClientRect().left + 1)
|
||||
return;
|
||||
|
||||
var row = e.getDocumentPosition().row;
|
||||
var selection = editor.session.selection;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue