diff options
| author | Rose Hogenson <rosehogenson@posteo.net> | 2024-01-11 18:48:07 -0800 |
|---|---|---|
| committer | Rose Hogenson <rosehogenson@posteo.net> | 2024-01-11 18:48:07 -0800 |
| commit | f842e04c4b5579342c1e74b41e867d02e1727f3d (patch) | |
| tree | 1b1f17332332fd6a6dde0f11aad85f683f4b8799 /src/rope.rs | |
| parent | Optimize for ASCII case in floor/ceil_grapheme. (diff) | |
| download | editor-f842e04c4b5579342c1e74b41e867d02e1727f3d.tar.zst | |
Don't read the wrong value in cursor_pos.
It seems like sometimes a slow terminal like lxterminal can take a
little while to respond with the cursor position, so the read can time
out. If it does, a later call to cursor_pos could read it in. To prevent
this, we can call read before even querying the position. If there are
any previous pending status responses, this should hopefully read them
in, and we can abort early without getting confused. If there is no
buffered data on stdin, then it's hopefully safe to write the status
query and read the response.
Diffstat (limited to 'src/rope.rs')
0 files changed, 0 insertions, 0 deletions
