Menu

#189 Erratic 'bottomRedraw'

9.0.3
closed
nobody
None
Bug
major
2019-01-22
2018-11-01
No

Paste this report into an Alpha window with hard wrap
fillColumn=64. Resize the window to approximately 75 chars wide.
Make the window short enough vertically, say 15 lines high.
Scroll to place the Q line near the middle of the window. Now
start writing with short words after the Qs. At the moment the
end of the line (marked 888) hits the edge of the window, the
window focus suddenly jumps, making the active line the last
visible line of the window.

z
z
z
z
z

QQQ QQQ QQQ QQQ QQQ QQQ QQQ QQQ QQQ zzz zzz zzz zzz zzz 888
ggg ggg ggg ggg ggg ggg ggg ggg ggg ggg ggg ggg ggg ggg ggg

z
z
z
z
z
z
z
z
z
z
z
z
z
z

Discussion

  • Bernard Desgraupes

    I have seen this recently (on Mojave) and don't know why we get these annoying jumps. I hope your detailed recipe will help me catch the culprit. Thanks for reporting.

     
  • Bernard Desgraupes

    After a lot of experiments, I have identified the exact circumstances which provoke these jumps. In any file, this affects only the longest line. It concerns lines that are longer than the width of the text view (i-e which extend past the right edge of the window).

    If the longest line (say L1) is not at the bottom of the window and you type a character anywhere in the visible part of this line, it "jumps" to the bottom of the window, that is to say the text is moved so that line L1 becomes the last line of the visible part of the text.

    If you have another long line (say L2), typing a character does not cause this strange behavior but if you keep typing characters, then as soon as the length of L2 exceeds the length of L1, line L2 jumps to the bottom of the window. This happens because at this moment L2 becomes the longest line of the text.

    I don't think this is related to the fillColumn preference but I have no clue at the moment to understand what's going on under the hood.

     
  • Bernard Desgraupes

    For the record, I'm still investigating. No luck so far...

     
  • Chris Skeels

    Chris Skeels - 2018-12-17

    I see this too when editing .tex files. I am not sure if whether the insertion point being near the middle of a line matters (in the only instance that springs to mind, the cursor was mid-line). In any event, the common feature is that when I inset some sort of environment, say in-line maths, it is not uncommon to see what Joachim describes. Typing command-I sees it all spring back to the middle of the screen again (and the text tidied up as well, in the usual command-I way).

     
  • Bernard Desgraupes

    Comment about command-I springing back to the original position: this is because the proc paragraph::fillOne has a remember argument which (if set to 1) invokes another proc called goBackToWhereYouWere defined in paragraphs.tcl.

     
  • Bernard Desgraupes

    I spent a considerable amount of time on this and have been unable to find the core reason: it clearly happens inside the Cocoa machinery but maybe as a result of something wrong with Alpha. Anyway, I have installed a workaround that seems to fix the problem.
    Changes committed to the repository (rev. 1614). The core must be rebuilt.

     
  • Bernard Desgraupes

    • status: open --> fixed
    • Version: 9.0 --> 9.0.2
     
  • Bernard Desgraupes

    • status: fixed --> closed
    • Version: 9.0.2 --> 9.0.3
     

Log in to post a comment.