| Age | Commit message (Collapse) | Author | Files | Lines |
|
It's easier to only support files with valid utf-8.
|
|
For now it's exactly the same as backspace.
|
|
This seems to be what GNU screen provides, at least.
|
|
For now I'm just counting the failures, and aborting if cursor_pos
immediately failed before. We have to skip the incoming status reports
with read_key before cursor_pos will start working again. This should
flush any old status reports, and prevent reading them incorrectly.
|
|
|
|
|
|
I forgot that read can block. We actually don't want cursor_pos to block
for user input before querying, since it will fail nearly every time. It
did give me a good opportunity to test the error handling though.
|
|
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.
|
|
They say you can always do a better job on the rewrite, and to a certain
extent that was true here. I kept a lot of it the same though, since
there was a lot I liked from the original design. The main improvements
are in efficiency and code clarity.
|
|
Backspace:
Cooler backspace:
|
|
The editor only repaints when there is a small delay in the input, which
only happens when the user is typing. Otherwise the bytes go straight
into the buffer.
|
|
Is this how redo works?
|
|
|
|
Now it's balanced :D
|
|
|
|
|
|
|
|
|
|
|
|
|
|
I will be putting more functionality in this file.
|