Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase default caret move timeout from 30 to 100 ms and make it configurable #7201

Merged
merged 5 commits into from
Jul 10, 2017

Commits on May 24, 2017

  1. Increase default caret move timeout from 30 to 100 ms and make it con…

    …figurable.
    
    - 30 ms was chosen to ensure maximum responsiveness, but this just isn't enough in the wild; e.g. in complex web editors (particularly in Chrome) or when connecting to remote terminals with connection latency.
    - This is configurable via config.conf["editableText"]["caretMoveTimeout"]. It is not exposed in the GUI, as this should only be changed by advanced users. The value is in ms, not seconds, as that's a better unit for this purpose. However, the function continues to use seconds for its arguments for backwards compatibility.
    - Previously, _hasCaretMoved slept at the end of the loop but didn't check for caret movement again. This meant that it could return False even if the caret did actually move during the last sleep. Now, the timeout check happens after the caret movement check, ensuring the correct result.
    - _hasCaretMoved now works with ms rather than seconds to avoid floating point precision errors. These precision errors could result in an extraneous additional retry.
    - Added some debug logging to help diagnose caret tracking problems in future.
    jcsteh committed May 24, 2017
    Configuration menu
    Copy the full SHA
    a65c5b9 View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2017

  1. Review actions.

    jcsteh committed Jun 1, 2017
    Configuration menu
    Copy the full SHA
    5da54fe View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2017

  1. Avoid full caret move timeout when pressing the delete key by treatin…

    …g valueChange events as caret moves. Also, treat caret events as caret moves as well, as this should be more reliable than comparing bookmarks in some cases.
    jcsteh committed Jun 21, 2017
    Configuration menu
    Copy the full SHA
    c967b21 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2017

  1. Fix regression of cursor tracking in Chrome caused by c967b21. Chrome…

    … uses the system caret, but this moves before IA2 is updated. Ignore system caret events for IA2 implementations and rely only on IA2 caret events.
    jcsteh committed Jun 22, 2017
    Configuration menu
    Copy the full SHA
    e526792 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2017

  1. Fix regression of Automatic focus mode for caret movement (#7323) cau…

    …sed by c967b21.
    
    Firefox fires caret events even when you use caret movement commands when already at the edge of the control. That means we don't fire caretMovementFailed events in these cases. Furthermore, it seems quite a few things (e.g. Wordpad, Notepad++) don't fire valueChange or caret events when you press delete.
    To work around this, drop the checks for caret and valueChange events (and revert the shouldAllowSystemCaretEvent stuff). Instead, when pressing delete, compare the word at the caret (in addition to bookmarks) to detect movement.
    jcsteh committed Jun 26, 2017
    Configuration menu
    Copy the full SHA
    4a908f3 View commit details
    Browse the repository at this point in the history