@@ -369,35 +369,30 @@ def buscar_anterior(self):
369369 self .mostrar_mensaje_temporal ("Ocurrencia anterior encontrada" )
370370
371371 def reemplazar_texto (self ):
372- # Primero pedir la palabra a buscar y si n existe que se retorne la funcion
373372 buscar , ok = QInputDialog .getText (self , "Reemplazar" , "Texto a buscar" )
374-
375373 if not ok or not buscar :
376374 return
377375
378376 reemplazo , ok = QInputDialog .getText (
379- self , "Reemplazar" , f"Reeemplazar { buscar } por" )
380-
377+ self , "Reemplazar" , f"Reemplazar { buscar } por" )
381378 if not ok :
382379 return
383380
384381 pos = self .crear_editText .toPlainText ().find (buscar )
385382 if pos == - 1 :
386383 QMessageBox .information (
387- self , "Buscar" , f"No se encontro el texto { buscar } " )
384+ self , "Buscar" , f"No se encontró el texto { buscar } " )
388385 return
389386
390387 encontrado = self .mover_cursor_a_texto (buscar , desde_inicio = True )
391-
392388 if not encontrado :
393389 QMessageBox .information (
394390 self , "Reemplazar" , f"No se encontró '{ buscar } '" )
395391 return
396392
397- c = self .crear_editText .textCursor ()
398- # Inserta el reemplazo y mantiene cursor actualizado
399- c .insertText (reemplazo )
400- self .mostrar_mensaje_temporal ("Texto reemplazado correctamente" )
393+ c = self .crear_editText .textCursor ()
394+ c .insertText (reemplazo )
395+ self .mostrar_mensaje_temporal ("Texto reemplazado correctamente" )
401396
402397 def reemplazar_todo (self ):
403398 """Reemplaza todas las ocurrencias del texto buscado por el reemplazo dado."""
0 commit comments