zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: covici@ccs.covici.com, zsh-users@zsh.org
Subject: Re: how to get zsh to work with a screen reader
Date: Tue, 21 Jul 2015 15:56:05 -0700	[thread overview]
Message-ID: <150721155605.ZM15346@torch.brasslantern.com> (raw)
In-Reply-To: <26940.1437503861@ccs.covici.com>

On Jul 21,  2:37pm, covici@ccs.covici.com wrote:
} Subject: how to get zsh to work with a screen reader
}
} when I use zsh, I hear the entire line repeated when I do a completion,
} or after I type a carriage return, I hear the line I just typed, even
} though there is not an extra copy on the screen.  So what I was
} wondering, is if zsh is writing the whole line out under many conditions

The ZLE editor does not use the curses package for screen optimization,
so among other things if the cursor is at column X and needs to move
across some existing text to column X+10, ZLE may reprint the characters
rather than emit a cursor movement command.

It will also prefer to overstrike a region with the text that is meant
to appear there, rather than to assume the text is already visible and
simply move past it, because it does not attempt to maintain an internal
data structure that reflects the contents of the screen -- it only keeps
a data structure for the text of the prompt and the contents of the edit
buffer.  So any time it wants the screen and the buffer to match, the
only way it can be certain that is true is to reprint everything.

The assumption is that the terminal emulator will either optimize out
unnecessary redrawing, or be fast enough that it doesn't matter.  That's
obviously not the case for a text-to-speech translator that interposes
between the shell output and the terminal.

Sadly, there's no practical approach I can think of to rectify this.


  reply	other threads:[~2015-07-21 22:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-21 18:37 covici
2015-07-21 22:56 ` Bart Schaefer [this message]
2015-07-21 23:02   ` covici
2015-07-22  0:53     ` Bart Schaefer
2015-07-22 10:34     ` Christoph (Stucki) von Stuckrad
2015-07-22 10:43       ` Peter Stephenson
2015-07-22 16:08         ` covici
2015-07-22 16:15         ` Bart Schaefer
2015-07-22 23:47           ` covici
2015-07-23  1:16             ` Bart Schaefer
2015-07-23 14:22               ` covici
2015-07-23 17:48                 ` Bart Schaefer
2015-07-24 22:35                   ` Vincent Lefevre
2015-07-22 15:22       ` covici

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=150721155605.ZM15346@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=covici@ccs.covici.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).