Commit fa2d4744 authored by Franco Pariani's avatar Franco Pariani
Browse files

Enable/Disable hints

parent 44c91794
......@@ -60,6 +60,11 @@
<input type="checkbox" style="width: 15px; display: inline-block;" name="argumentoI" class="form-control form-control-sm" [(ngModel)]=argumentoI>
Mostrar advertencias de uso de operadores infijos
</label>
<br>
<label>
<input type="checkbox" style="width: 15px; display: inline-block;" name="hintsCheck" class="form-control form-control-sm" [(ngModel)]=hintsCheck (change)="changeHints()">
Mostrar sugerencias de autocompletar
</label>
</div>
<div class="form-group">
<button class="btn btn-secondary" (click)="saveConfig()">Guardar</button>
......
......@@ -73,6 +73,7 @@ export class MateFunComponent {
modificado = false;
argumentoI = false;
argumentoF = false;
hintsCheck = true;
editableLoaded = false;
editDialogFired = false;
archivosTree :any;
......@@ -233,7 +234,12 @@ export class MateFunComponent {
this.notifService.error(error);
this.popover.close();
}
);
);
if (!this.hintsCheck){
delete this.configCodeMirror.extraKeys["Ctrl-Space"];
}else{
this.configCodeMirror.extraKeys["Ctrl-Space"] = "autocomplete";
}
}
aumentarFuente(){
......@@ -418,7 +424,7 @@ export class MateFunComponent {
}
archivoModificado(event){
if (!event.ctrlKey && !event.altKey){
if (this.hintsCheck && !event.ctrlKey && !event.altKey){
if (/^[\w\_\d]$/.test(event.key) || event.key == 'Enter')
this.codemirror.instance.showHint(event);
if(this.copiaNombreArchivo!=this.archivo.nombre || this.copiaContenidoArchivo != this.archivo.contenido){
......@@ -625,6 +631,4 @@ export class MateFunComponent {
this.graph3DComp.onActivate();
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment