Menu

#124 link detection dirties window

9.0b3
closed
nobody
None
Bug
major
2017-05-03
2017-04-09
No

Open the file fileManipulation.tcl in the AlphaTcl library.
Close it again without doing anything.
A dialogue asks to save changes, discard or cancel.
Quite weird since no changes were made.

Try Cancel. Then try Undo, to try to figure out
what the changes were. No actual changes are undone,
but Vince's email address is selected!

The bug has to do with automatic link detection. It does
not occur with link detection off.

Discussion

  • Bernard Desgraupes

    There is not much I can do about this as Cocoa itself performs the link detection and considers that the document is modified. I agree that this is questionable concerning link detection (only text attributes are modified in that case unlike dash substitution which actually modifies the text). Note, on the other hand, that this is undoable.

    What I can propose is to disable the document checking performed by Alpha when a document is opened (or make it depend on a new global preference which could be called autoTextCheckingOnOpen). In that case, if the preference is not enabled, links would not be marked automatically when the file is opened.

    I have added a new menu item Text ↣ Text Options ↣ Check Document to force an immediate check of the entire document (for the currently enabled options). I have also modified Alpha so that text checking occurs as soon as some of the options found in the Text Options submenu is enabled (rather than depending on Cocoa to do so at a later unpredictable moment). This does not fix the current issue but might help with the proposed preference.

    Note also that programmatically there is already a text check command.

    Any thoughts ?

    Changes committed to the repository (rev. 1313). The core must be rebuilt.

     
  • Bernard Desgraupes

    I have completed the implementation of the suggestions above. There is now a new global preference called Check Text On Open to control automatic checking (of the currently enabled text checking options) when a document is opened. Its default value is 0. It is found in the Document panel of the Global Preferences.

    Note that, as explained above, you may at any moment force a text checking via the Text ↣ Text Options ↣ Check Document menu item.

    Changes committed to the repository (rev. 1326). The core must be rebuilt.

     
  • Bernard Desgraupes

    Additional remark: I have been unable to prevent Cocoa from marking the window as dirty after a link detection check. I'm resolving this ticket as fixed.

     
  • Bernard Desgraupes

    • status: open --> fixed
    • Version: 9.0b1 --> 9.0b2
     
  • Bernard Desgraupes

    • status: fixed --> closed
    • Version: 9.0b2 --> 9.0b3
     

Log in to post a comment.