mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-14 04:17:05 +01:00
Clear or set JS Hints based on codeAssist
On toggle of codeAssist and being false, clear all JS Hint widgets in all tabs If turned on though, set in current tab Run updateHints on switching tab (helps complete above step)
This commit is contained in:
@@ -1211,6 +1211,21 @@ var ICEcoder = {
|
||||
top.ICEcoder.codeAssist = !top.ICEcoder.codeAssist;
|
||||
top.ICEcoder.cssColorPreview();
|
||||
cM.focus();
|
||||
|
||||
if (!top.ICEcoder.codeAssist) {
|
||||
for (i=0;i<top.ICEcoder.cMInstances.length;i++) {
|
||||
cM = top.ICEcoder.content.contentWindow['cM'+top.ICEcoder.cMInstances[i]];
|
||||
cM.operation(function(){
|
||||
var widgets = top.ICEcoder['cM'+top.ICEcoder.cMInstances[i]+'widgets'];
|
||||
for (var j=0; j<widgets.length; ++j) {
|
||||
cM.removeLineWidget(widgets[j]);
|
||||
}
|
||||
widgets.length = 0;
|
||||
});
|
||||
}
|
||||
} else {
|
||||
top.ICEcoder.updateHints();
|
||||
}
|
||||
},
|
||||
|
||||
// Queue items up for processing in turn
|
||||
@@ -1500,6 +1515,9 @@ var ICEcoder = {
|
||||
top.ICEcoder.findMode = false;
|
||||
ICEcoder.findReplace('find',true,false);
|
||||
|
||||
// Rerun JS Hint
|
||||
if (top.ICEcoder.codeAssist) {top.ICEcoder.updateHints()};
|
||||
|
||||
// Finally, update the cursor display
|
||||
top.ICEcoder.getCaretPosition();
|
||||
top.ICEcoder.updateCharDisplay();
|
||||
|
||||
Reference in New Issue
Block a user