#460 Fix 2832769, 2998294, and 3193168

closed-accepted
8
2014-09-30
2012-09-15
No

Hi,

attached patch fixes bug 2998294 and maybe other scroll related bugs.

The patch encapsulates the Anchor class and reworks the event code of "preContentRemoved" and "contentInserted". Also it adds some more comments of the usage of the fields "scrollLine" and "physicalLine" in the Anchor class as FirstLine and ScrollLineCount have very different semantics on these fields.

As a side effect the update of the screen line count per physical line is now done directly instead of the doDelayedUpdate() method.

Please review and test.

Discussion

1 2 > >> (Page 1 of 2)
  • Alan Ezust

    Alan Ezust - 2012-09-15
    • assigned_to: nobody --> shlomy
     
  • Alan Ezust

    Alan Ezust - 2012-09-15

    I hope that other admins also test this patch, as I am planning to. It's a big patch.

     
  • Alan Ezust

    Alan Ezust - 2012-09-15
    • priority: 5 --> 8
    • labels: --> texteditor
     
  • Thomas Meyer

    Thomas Meyer - 2012-09-16

    v01 had still some bugs. hopefully I got everything right now.

     
  • Anonymous - 2012-09-18

    v2 doesn't seem to fix the bug. The reproduction steps specified in bug 2998294 still reproduce the problem.
    I haven't looked at the code yet, only tried the patch.

     
  • Anonymous - 2012-09-18
    • status: open --> pending
     
  • Anonymous - 2012-09-18

    Furthermore, the original bug does not reproduce with the trunk version of jEdit with a single Undo. However it is reproduced with a single Undo with the patch.

     
  • Thomas Meyer

    Thomas Meyer - 2012-09-23

    Hi shlomy,

    sorry I did forget to test the soft wrap case. Please test v3 of my patch. Hopefully the new version fixes all problems.

    with kind regards
    thomas

     
  • Thomas Meyer

    Thomas Meyer - 2012-09-23
    • status: pending --> open
     
  • Alan Ezust

    Alan Ezust - 2012-09-23

    I was also testing with soft wrap.
    I get a BeanShellAction: java.lang.NullPointerException
    9:34:39 AM [AWT-EventQueue-0] [error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.scrollTo(TextArea.java:853)
    when I test v3 of your patch against tescase described in 2998294.

    Without your patch, I can not reproduce 2998294 anymore.

     
  • Thomas Meyer

    Thomas Meyer - 2012-09-23

    1.) "I was also testing with soft wrap.
    I get a BeanShellAction: java.lang.NullPointerException
    9:34:39 AM [AWT-EventQueue-0] [error] BeanShellAction: at
    org.gjt.sp.jedit.textarea.TextArea.scrollTo(TextArea.java:853)
    when I test v3 of your patch against tescase described in 2998294."

    Can you describe step by step how did you get the stack trace with the v3 patch applied? Do you have some special options set or something like this?
    Can you please attach the complete stack trace?

    2.) "Without your patch, I can not reproduce 2998294 anymore."

    Could you please double check about this? I still can reproduce the problem with the current trunk.

     
  • Alan Ezust

    Alan Ezust - 2012-09-23

    I apologize! I believe I was confused about which jar I was testing.
    On second test, it seems your v3 patch fixes the problem and latest daily build still reproduces the issue.
    So ignore my previous comment.

     
  • Alan Ezust

    Alan Ezust - 2012-09-23
    • status: open --> pending
     
  • Alan Ezust

    Alan Ezust - 2012-09-23
    • status: pending --> open
     
  • Thomas Meyer

    Thomas Meyer - 2012-09-24

    new version also fixes "NPE when scrolling to top after multiline delete (soft wrap) - ID: 3193168"

     
  • Alan Ezust

    Alan Ezust - 2012-09-24

    thank you *so much* for fixing 3193168 too! I really hated that bug. Testing v4 now.
    Definitely resolves those two bugs for me.

     
  • Alan Ezust

    Alan Ezust - 2012-09-24
    • summary: Fix 2998294 --> Fix 2998294 and 3193168
     
  • Alan Ezust

    Alan Ezust - 2012-09-24
    • assigned_to: shlomy --> ezust
     
  • Alan Ezust

    Alan Ezust - 2012-10-03

    I see there is a FIXME comment on 1265 and another one on 474. And you told me there were some other bugs in it you wanted to fix. So I am waiting for v5

     
  • Alan Ezust

    Alan Ezust - 2012-10-03
    • status: open --> open-remind
     
  • Thomas Meyer

    Thomas Meyer - 2012-10-04

    v5 - fix folding

     
1 2 > >> (Page 1 of 2)

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks