minor modification
This commit is contained in:
parent
dbaeb42a12
commit
7fe1c137e3
|
@ -472,7 +472,8 @@ amdRequire(["vs/editor/editor.main"], function () {
|
|||
return undefined; // in span part
|
||||
} else if (startColumn < hmSpanPartOffset) {
|
||||
// in hex part
|
||||
range.startColumn = parseInt(startColumn / hmUnitLength) * hmUnitLength + 1;
|
||||
range.startColumn =
|
||||
parseInt(startColumn / hmUnitLength) * hmUnitLength + 1;
|
||||
startColumn = parseInt(startColumn / hmUnitLength) + hmStrPartOffset;
|
||||
if (endColumn > hmHexPartLength) endColumn = hmHexPartLength;
|
||||
range.endColumn = parseInt(endColumn / hmUnitLength) * hmUnitLength + 1;
|
||||
|
@ -496,12 +497,10 @@ amdRequire(["vs/editor/editor.main"], function () {
|
|||
editor.onMouseUp((e) => {
|
||||
let model = editor.getModel();
|
||||
let range = editor.getSelection();
|
||||
let cordRange = getCordinateRangeOneLine(range);
|
||||
|
||||
if (undefined === cordRange) return;
|
||||
|
||||
console.log("In: " + range);
|
||||
console.log("Out: " + cordRange);
|
||||
|
||||
let cordRange = getCordinateRangeOneLine(range);
|
||||
if (undefined === cordRange) return;
|
||||
|
||||
// first remove old decos
|
||||
let decos = model.getLineDecorations(range.startLineNumber);
|
||||
|
@ -516,20 +515,12 @@ amdRequire(["vs/editor/editor.main"], function () {
|
|||
[
|
||||
{
|
||||
range: range,
|
||||
id: "hm",
|
||||
options: {
|
||||
className: "hex-select",
|
||||
},
|
||||
},
|
||||
]
|
||||
);
|
||||
|
||||
model.deltaDecorations(
|
||||
[],
|
||||
[
|
||||
{
|
||||
range: cordRange,
|
||||
id: "hm",
|
||||
options: {
|
||||
className: "hex-select",
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue