Skip to content

Commit ee6be10

Browse files
committed
refactor: remove unused color gutter flag
1 parent 24bbeb9 commit ee6be10

File tree

1 file changed

+3
-8
lines changed
  • src/extensionsIntegrated/CSSColorPreview

1 file changed

+3
-8
lines changed

src/extensionsIntegrated/CSSColorPreview/main.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,8 @@ define(function (require, exports, module) {
149149
* @param {Editor} editor the codemirror instance
150150
* @param {Number} lineNumber the line number that is clicked
151151
* @param {string} colorValue the color value clicked
152-
* @param {boolean} dontEdit if set to true,color editor won't be opened
153152
*/
154-
function _colorIconClicked(editor, lineNumber, colorValue, dontEdit) {
153+
function _colorIconClicked(editor, lineNumber, colorValue) {
155154
const lineText = editor.getLine(lineNumber);
156155
const colorIndex = lineText.indexOf(colorValue);
157156
const currentPos = editor.getCursorPos(false, "start");
@@ -160,10 +159,6 @@ define(function (require, exports, module) {
160159
editor.focus();
161160
}
162161

163-
if(dontEdit){
164-
return;
165-
}
166-
167162
// Added a 50ms delay with setTimeout to make sure the quick edit menu toggles correctly.
168163
// Without it, closing the menu trigger text selection, reopening the menu.
169164
setTimeout(() => {
@@ -200,7 +195,7 @@ define(function (require, exports, module) {
200195
$marker.click((event)=>{
201196
event.preventDefault();
202197
event.stopPropagation();
203-
_colorIconClicked(editor, obj.lineNumber, obj.colorValues[0], false);
198+
_colorIconClicked(editor, obj.lineNumber, obj.colorValues[0]);
204199
});
205200
} else {
206201
// Multiple colors preview
@@ -225,7 +220,7 @@ define(function (require, exports, module) {
225220
$colorBox.click((event)=>{
226221
event.preventDefault();
227222
event.stopPropagation();
228-
_colorIconClicked(editor, obj.lineNumber, color, false);
223+
_colorIconClicked(editor, obj.lineNumber, color);
229224
});
230225
$marker.append($colorBox);
231226
}

0 commit comments

Comments
 (0)