Commit Graph

1591 Commits

Author SHA1 Message Date
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
32150672fc store: Fix the use of transactions and a broken test. 2016-02-13 00:44:14 +01:00
Qi Xiao
56490fcd31 Support overriding the database file. 2016-02-13 00:35:33 +01:00
Qi Xiao
f454cfb386 store: Add a lastAmongDup column to the cmd table. 2016-02-13 00:21:46 +01:00
Qi Xiao
2468aece8d store: createTable -> initTable 2016-02-12 21:37:14 +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
e0711783e0 Remove {Bool,Error}.String.
Their differences with corresponding Repr methods are too substle to not be
confusing.
2016-02-12 12:15:22 +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
c825a10e4e Add drone.io badge alongside Travis badge. 2016-02-12 03:51:20 +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
ef834c05dd Make Value part of the Caller interface. 2016-02-12 03:07:24 +01:00
Qi Xiao
3a49eea4d3 Implement Map.Repr using a reusable helper. 2016-02-12 02:52:54 +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
60a7f59ea9 Ditch IndexVarer interface in favor of IndexSetter.
This complicates indexing a little bit, but makes it easier to implement new
containers.
2016-02-12 02:32:15 +01:00
Qi Xiao
34fddcd100 Expose editor builtins via a le module. 2016-02-12 00:43:41 +01:00
Qi Xiao
ae041b7dbf eval: evalCtx -> EvalCtx 2016-02-12 00:30:36 +01:00
Qi Xiao
82320ae671 eval: mod -> module 2016-02-12 00:20:26 +01:00
Qi Xiao
dfede2f23d eval: ns -> Namespace. 2016-02-12 00:19:14 +01:00
Qi Xiao
7d219bb81f Reset oldBuf properly. 2016-02-12 00:11:03 +01:00
Qi Xiao
34c0d96830 Query HOME consistently.
A bug with osutil.Getcwd was also fixed. This fixes #91.
2016-02-11 23:43:48 +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
4ac2572555 Add a test case against parse.Parse. 2016-02-11 22:59:21 +01:00
Qi Xiao
9cbec16054 Report multiple errors in ReadLine. 2016-02-11 21:45:27 +01:00
Qi Xiao
6450900774 Change uploading URL. 2016-02-11 21:16:34 +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
dad3ddd86e Update comment. 2016-02-11 20:28:18 +01:00
Qi Xiao
00b2f372bc Use basic readline when stdin is not tty or editor errored.
This fixes #78.
2016-02-11 19:32:40 +01:00
Qi Xiao
6836681021 Instead panicking, propagate errors when reading terminal. 2016-02-11 19:27:35 +01:00
Qi Xiao
9a77f61287 Fix eval tests. 2016-02-11 19:11:38 +01:00
Qi Xiao
72f92911e2 Put myself in foreground after pipeline finishes.
This fixes #105.
2016-02-11 18:59:18 +01:00
Qi Xiao
a21f2a1bb7 Handle SIGINT when waiting for tasks to exit.
Tasks are given 50ms to exit. If they didn't, they are left running but has a
special "still running" exit status.

This mitigates #100.
2016-02-11 15:55:22 +01:00
Qi Xiao
655688e719 Use channel, not shared array to collect exit status.
Don't communicate by sharing memory, share memory by communicating.
2016-02-11 15:32:44 +01:00
Qi Xiao
bf10f121d7 eval.getHome -> osutil.GetHome 2016-02-11 00:12:48 +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
8a18ca4fa1 Implement an Indexer -> Caller adapter.
This fixes #90.
2016-02-10 22:01:56 +01:00
Qi Xiao
5e02996838 Fix outdated error message. 2016-02-10 21:52:48 +01:00