Commit Graph

66 Commits

Author SHA1 Message Date
Qi Xiao
0afe57b179 Parse G3 arrow keys. 2016-02-14 18:31:36 +01:00
Qi Xiao
089d4ad79c edit: read "normal" mouse event as well. 2016-02-13 20:37:02 +01:00
Qi Xiao
3c718a9bff edit: Adjust reader logic to deal with CSI starter. 2016-02-13 20:19:14 +01:00
Qi Xiao
26c4eba04c Initialize currentSeq properly. 2016-02-13 19:43:49 +01:00
Qi Xiao
c08ae1ea54 edit: More small refactor. 2016-02-13 19:21:29 +01:00
Qi Xiao
4586199219 edit: Small refactor. 2016-02-13 19:17:20 +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
6836681021 Instead panicking, propagate errors when reading terminal. 2016-02-11 19:27:35 +01:00
Qi Xiao
8125e2f9e6 golint fixes. 2016-02-07 23:23:16 +01:00
Qi Xiao
9551123779 edit: cosmetics 2016-02-03 13:26:51 +01:00
Qi Xiao
7d8d8fdc67 edit: fix reader deadlock 2016-02-03 13:15:11 +01:00
Qi Xiao
0372b56304 edit: add Close methods to {async_,}reader 2016-02-03 02:33:42 +01:00
Qi Xiao
946fa29e9a edit: make {async_,}reader restartable; ditch "Stop" 2016-02-03 02:11:43 +01:00
Qi Xiao
1d7e8e75a9 edit: Remove reader.ctrlAck.
There is no need for it since reader.ctrl is unbuffered
2016-02-02 21:32:55 +00:00
Cheer Xiao
d9e94440cb Move util/{after async_reader}.go to edit/ 2015-02-26 15:31:21 +01:00
Cheer Xiao
72d6e63238 Much cosmetics for edit 2015-02-24 22:56:38 +01:00
Cheer Xiao
5afdcea919 golint fixes for edit 2015-02-24 21:38:50 +01:00
Cheer Xiao
fd2e26700a Move error-related utilities from util to errutil 2015-02-09 12:28:36 +01:00
Cheer Xiao
b9dfd552b2 util.{Panic Recover} -> util.{Throw Catch} 2015-02-09 12:11:47 +01:00
Cheer Xiao
1ad8fcaa1f **.go: xiaq/elvish -> elves/elvish 2014-10-29 20:50:10 +01:00
Cheer Xiao
b01a9befbd edit: Synchronize control of edit.Reader too 2014-03-17 22:54:42 +08:00
Cheer Xiao
98c034f581 util/async-reader.go: set file back to blocking mode and sync properly 2014-03-17 22:47:09 +08:00
Cheer Xiao
4a1415dcda Much better sys.SetNonblock... 2014-03-17 22:39:57 +08:00
Cheer Xiao
0624368bcc Use util.AsyncReader to build a new async edit.Reader
Now we can start really dealing with signals!
2014-03-10 21:22:54 +08:00
Cheer Xiao
bbca89f4c9 Support Shift-Tab 2014-03-10 00:12:12 +08:00
Cheer Xiao
20924b0c31 edit: Don't use Capital in error msg 2014-03-10 00:07:29 +08:00
Cheer Xiao
2a4887007b edit: Fix (*BadEscSeq).Error 2014-03-10 00:01:51 +08:00
Cheer Xiao
d017c35dd9 edit: Ditch reader.unreadBuffer 2014-03-09 16:21:00 +08:00
Cheer Xiao
42fcb8eb22 goimports 2014-02-10 11:33:53 +08:00
Cheer Xiao
db7eba2140 Improve XXX comments
Most are turned into `BUG(xiaq):`; the rest into `XXX(xiaq):`
2014-02-08 19:23:23 +08:00
Cheer Xiao
7d7814ef9b golint fixes 2014-01-31 19:18:10 +08:00
Cheer Xiao
c1711bbd0a Project rename: das -> elvish 2014-01-29 18:44:07 +08:00
Cheer Xiao
67b5621e86 gofmt 2014-01-27 18:55:45 +08:00
Cheer Xiao
713f87fc9a Ditch relative imports, make this go get-able 2014-01-25 19:10:30 +08:00
Cheer Xiao
29363b8186 gofmt 2014-01-16 09:24:14 +08:00
Cheer Xiao
c1b2be7cd1 Use util.{Panic Recover} in edit/reader.go 2013-11-17 00:36:24 +08:00
Cheer Xiao
b717399e03 At editor startup, find cursor position and insert artificial carriage return if not on first column. 2013-11-16 14:28:07 +08:00
Cheer Xiao
bd3611e28f Implement an infinite unread buffer in edit.reader 2013-11-15 18:24:09 +08:00
Cheer Xiao
e1c96c6cfc Separate "util" package. 2013-10-18 09:46:06 +08:00
Cheer Xiao
117850e80e edit: Fix CSI parsing, a bit cleanup & commenting 2013-10-07 13:57:45 +08:00
Cheer Xiao
105a47b7cc edit: More detailed BadEscSeq 2013-10-07 13:48:15 +08:00
Cheer Xiao
3584180846 edit: Fix parsing of Alt- (letter) 2013-09-27 21:15:16 +08:00
Cheer Xiao
c3d3993c15 edit: Remove unused code 2013-09-27 21:13:24 +08:00
Cheer Xiao
2765c43328 edit: Handle \r \n and Backspace as if they are graphical 2013-09-27 21:11:17 +08:00
Cheer Xiao
a0025694d1 edit: Parse Shift- function keys 2013-09-27 21:10:13 +08:00
Cheer Xiao
bb9f6e2850 edit: Fix an error not being returned 2013-09-27 20:57:34 +08:00