Ticket #99: libtool_fix_1_of_1_rev_daeb49f45c7a_Issue_99__Send_notification_to_services_also_from__basicWithoutRedraw___.patch

File libtool_fix_1_of_1_rev_daeb49f45c7a_Issue_99__Send_notification_to_services_also_from__basicWithoutRedraw___.patch, 1.8 KB (added by jan vrany, 8 years ago)

Better fix, ready for testing

  • Tools__CodeView2.st

    # HG changeset patch
    # User Jan Vrany <jan.vrany@fit.cvut.cz>
    # Date 1467756703 -3600
    #      Tue Jul 05 23:11:43 2016 +0100
    # Branch jv
    # Node ID daeb49f45c7a0af4e9508174aa024316eb277a79
    # Parent  814e3fa20205a4446620f37906d68a4e69d8f8fb
    Issue 99: Send notification to services also from #basicWithoutRedraw...
    
    ...methods which are used by copy/paste and when loading content
    from file. This fixes issue 99, however there still might be some
    other forgotten cases when notification is not sent.
    
    Reacting on #textChanged notification is not an option because
    * is sent way to often, sometimes twice for one modification
      (too bad, but deeply burried in EditTextView code which is a
      mess, sigh)
    * the #textChanged notification does not carry information about
      what actually changed so services cannot update only relevant
      part. This is particularly a problem for syntax highlighting
      and large sources, such as Java code.
    
    diff -r 814e3fa20205 -r daeb49f45c7a Tools__CodeView2.st
    a b  
    37573757basicWithoutRedrawInsertLines:lines from:start to:end before:lineNr
    37583758    super basicWithoutRedrawInsertLines:lines from:start to:end before:lineNr.
    37593759    self updateReallyModified.
     3760    self notifyLinesModifiedFrom: lineNr + 1 to: lineNr + lines size.
     3761
     3762    "Modified: / 05-07-2016 / 22:56:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    37603763!
    37613764
    37623765basicWithoutRedrawInsertStringWithoutCRs:aString atLine:lineNr col:colNr
    37633766    super basicWithoutRedrawInsertStringWithoutCRs:aString atLine:lineNr col:colNr.
    37643767    self updateReallyModified.
     3768    self notifyLinesModifiedFrom: lineNr to: lineNr
     3769
     3770    "Modified: / 05-07-2016 / 19:01:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    37653771!
    37663772
    37673773insertLines:someText from:start to:end before:lineNr