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

Jitter in typewriter mode #118

Open
khaeru opened this issue Apr 2, 2018 · 0 comments
Open

Jitter in typewriter mode #118

khaeru opened this issue Apr 2, 2018 · 0 comments

Comments

@khaeru
Copy link

khaeru commented Apr 2, 2018

Running:

  • Zen 0.18.0
  • Atom 1.24.1
  • Ubuntu Linux 17.10

When I activate the typewriter option, there is noticeable "jitter"—a brief vertical shift/distortion of the text—on every keystroke. This happens whether typing new text, cutting/pasting, or simply moving the cursor left or right with the arrow keys, and it causes eyestrain, so I find the option unusable :(

Zen seems to implement this option by listening for the event did-change-cursor-position. Two ideas for a fix (that I'm sorry I don't have bandwidth to experiment with right now):

  • Check if the changed cursor position involves a change of row. If the cursor has not changed rows, don't scroll.
  • Zen calls the low-level method TextEditorElement.setScrollTop(). There is an official API method TextEditor.scrollToCursorPosition() that, by default, tries to center the cursor. It invokes some complex autoscrolling mechanism, which might avoid producing jitter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant