Skip to content
Snippets Groups Projects
Commit fa2d4744 authored by Franco Pariani's avatar Franco Pariani
Browse files

Enable/Disable hints

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