diff options
author | John Hawthorn <john.hawthorn@gmail.com> | 2017-10-15 23:32:41 -0700 |
---|---|---|
committer | John Hawthorn <john.hawthorn@gmail.com> | 2017-10-16 00:05:38 -0700 |
commit | dc4e9b8abf678ce57172d1014a7fa0367926f386 (patch) | |
tree | 730e9e58752e816b1e267cbb6dcc93850814b53c /src/tty_interface.h | |
parent | 0ee47c277352873995405d684daf6ce994a834d0 (diff) |
Rewrite cursor implementation
Index the cursor from the beginning instead of the end, which is easier
(at least for me) to think about.
This also fixes issues with Ctrl-W in the previous implementation.
Diffstat (limited to 'src/tty_interface.h')
-rw-r--r-- | src/tty_interface.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tty_interface.h b/src/tty_interface.h index 34f4e59..9572c3f 100644 --- a/src/tty_interface.h +++ b/src/tty_interface.h @@ -14,7 +14,7 @@ typedef struct { char search[SEARCH_SIZE_MAX + 1]; char last_search[SEARCH_SIZE_MAX + 1]; - int offset; + size_t cursor; char input[32]; /* Pending input buffer */ |