Commit Graph

371 Commits

Author SHA1 Message Date
Qi Xiao
213e43ee1b Implement notification.
This fixes #122.
2016-02-13 16:35:16 +01:00
Qi Xiao
d7cbcffdbf Remove per-session history.
This fixes #116.
2016-02-13 15:12:19 +01:00
Qi Xiao
90ab0ee6c2 Implement lastAmongDup in the session history too.
This fully fixes #116.
2016-02-13 01:02:13 +01:00
Qi Xiao
b7d473b92e edit: history -> historyState 2016-02-13 00:58:33 +01:00
Qi Xiao
939bd0e505 Only select unique histories from the storage.
This addresses #116.
2016-02-13 00:51:03 +01:00
Qi Xiao
c6bcb714c1 edit: Account for multi-width runes in delta drawing.
This fixes #117.
2016-02-12 20:30:10 +01:00
Qi Xiao
1e51776176 edit: Use a fixed timeout for runes in escape sequences. 2016-02-12 20:11:56 +01:00
Qi Xiao
7da398faef Fix parsing of unmodified function keys. 2016-02-12 19:52:11 +01:00
Qi Xiao
e1f8f4b675 Read mouse event.
This fixes #107. Now we can use elvish on touch screens! :D
2016-02-12 19:46:44 +01:00
Qi Xiao
7205edeb61 edit: Redesign the interface of reader. 2016-02-12 19:13:16 +01:00
Qi Xiao
1c98a9b97f Cleanups. 2016-02-12 13:31:24 +01:00
Qi Xiao
67d09b41b8 Refresh dir preview after cd'ing in navigation mode.
This fixes #111.
2016-02-12 12:28:58 +01:00
Qi Xiao
13143c4f2d Add editor builtin "redraw". 2016-02-12 12:04:20 +01:00
Qi Xiao
7bf9af9f5a Do a full refresh after running function from the editor.
This fully resolves #89.
2016-02-12 12:02:48 +01:00
Qi Xiao
b617aeca1d Add an accept-completion editor builtin. 2016-02-12 03:54:08 +01:00
Qi Xiao
dd0032eb07 Expose the key binding as a map-like value. 2016-02-12 03:44:08 +01:00
Qi Xiao
e49d44c090 edit: Make the name part of a builtin. 2016-02-12 03:20:10 +01:00
Qi Xiao
feeea631a8 Call the "type" of a Value "kind" instead. Make it just a string.
Currently the result of Type() doesn't really correspond to the underlying
type. For instance, "types" of all of closures, builtins and external commands
are "fn", despite they having different underlying types. Thus we go a bit
vague and just call them "kinds".
2016-02-12 02:40:34 +01:00
Qi Xiao
d7b22b0a22 Commit the missing edit/module.go. 2016-02-12 02:38:42 +01:00
Qi Xiao
34fddcd100 Expose editor builtins via a le module. 2016-02-12 00:43:41 +01:00
Qi Xiao
7d219bb81f Reset oldBuf properly. 2016-02-12 00:11:03 +01:00
Qi Xiao
7f5f96ca0f When starting ReadLine, reset old buffer of the writer.
This fixes #101.
2016-02-11 23:15:17 +01:00
Qi Xiao
6d2d63387d Support completion ~uname/...
This fixes #86.
2016-02-11 23:03:01 +01:00
Qi Xiao
9cbec16054 Report multiple errors in ReadLine. 2016-02-11 21:45:27 +01:00
Qi Xiao
4d92824da6 Trivial control flow change. 2016-02-11 21:06:47 +01:00
Qi Xiao
9f4bea6717 Don't write margin after last column in completion listing.
This fixes #106.
2016-02-11 21:06:04 +01:00
Qi Xiao
6836681021 Instead panicking, propagate errors when reading terminal. 2016-02-11 19:27:35 +01:00
Qi Xiao
0150905b68 Remove Esc from the default binding of insert mode. 2016-02-10 23:57:28 +01:00
Qi Xiao
4f74be8c1e Add a trailing space when completing file name. 2016-02-10 23:56:33 +01:00
Qi Xiao
9bb9afb251 Improve signal handling. 2016-02-09 18:38:26 +01:00
Qi Xiao
dca576ff16 Renames. 2016-02-09 01:21:38 +01:00
Qi Xiao
ae8cfbc011 Extend the binding for command mode. 2016-02-08 22:57:58 +01:00
Qi Xiao
832448e047 logutil.Sink -> .Discard 2016-02-08 20:51:44 +01:00
Qi Xiao
b8684428bf Support binding key to elvish function.
This fully resolves #39.
2016-02-08 20:40:39 +01:00
Qi Xiao
a63b241a45 edit: Introduce a fn interface. 2016-02-08 19:28:40 +01:00
Qi Xiao
87139307ce Reorder. 2016-02-08 19:15:52 +01:00
Qi Xiao
ed81aea28e Fix bind. 2016-02-08 19:14:30 +01:00
Qi Xiao
8125e2f9e6 golint fixes. 2016-02-07 23:23:16 +01:00
Qi Xiao
7603a83a98 Parse tildes; fix highlighting of wildcards. 2016-02-07 14:14:13 +01:00
Qi Xiao
bbafbb0581 edit: Don't communicate by sharing memory, share memory by communicating. 2016-02-07 05:02:44 +01:00
Qi Xiao
22ffdbc5cf edit: Don't flush input. 2016-02-07 05:02:13 +01:00
Qi Xiao
087f7aa317 edit: Guard access to the isExternal map with a RWLock. 2016-02-07 04:54:34 +01:00
Qi Xiao
d674cedcac edit: Keep ed.isExternal on SIGINT.
This fixes #85.
2016-02-07 04:49:01 +01:00
Qi Xiao
85e9678911 edit: Add Alt-.. 2016-02-07 04:43:42 +01:00
Qi Xiao
85646e5029 edit: Implement move-dot-{s,e}ol 2016-02-07 04:30:57 +01:00
Qi Xiao
b298f006e7 edit: Implement move-dot-{left,right}-word. 2016-02-07 04:28:25 +01:00
Qi Xiao
ac7be854bb Fix variable name completion. 2016-02-07 03:10:52 +01:00
Qi Xiao
77df994361 Fix crash of move-dot-{up,down}. 2016-02-07 02:30:42 +01:00
Qi Xiao
3828c40167 New editor builtin select-history-next-or-quit. 2016-02-07 02:02:42 +01:00
Qi Xiao
5dfa7d2eb3 Move to more traditional behavior of tab completion. 2016-02-07 01:54:25 +01:00