odino
c7735f732d
make BreaklineCallback private (breaklineCallback
)
2019-08-26 17:41:23 +04:00
odino
dbd5467376
Added document as an argument to the LineBreakCallback
2019-08-16 14:37:33 +04:00
odino
ea717205ca
Added OptionBreakLineCallback, to run a callback every time there's a line break
...
It's useful to run a function everytime there's a line break -- Enter as well as, for example, ControlC.
With this PR, a new option is added to assign a callback that gets
called every time `renderer.BreakLine()` is called.
Added a test that makes sure the renderer doesn't break if the callback is
not specified, as well as to check that it runs ok when the callback executes.
Just to give a bit more of context: in [ABS](https://github.com/abs-lang/abs )
we are trying to implement ControlR (reverse search), and need to clear
the search selection every time the user "clears" the console, either by
pressing enter or by clearing the current line (eg. ControlC).
2019-08-16 04:30:44 +04:00
c-bata
843933453f
Add debug.AssertNoError for simplify
2018-12-14 22:28:41 +09:00
c-bata
acf27c314e
Add debug logger and assert
2018-12-10 04:16:49 +09:00
Masashi SHIBATA
b47e013727
Update .travis.yml ( #114 )
...
* Update .travis.yml
* Add build.sh for examples
* Update goimports
* update travis.yml
2018-12-09 20:42:33 +09:00
c-bata
d3ef529afd
Add option to customize insertion points for completions
2018-06-24 04:30:07 +09:00
c-bata
82330a197a
Support CJK and Cyrillic characters
2018-06-22 01:11:58 +09:00
c-bata
41714788bd
Refactor render.go
2018-02-19 19:56:10 +09:00
Nao YONASHIRO
d0c9836e1f
fix : #48
2018-02-19 16:50:05 +09:00
Nao YONASHIRO
c6186541a9
feat: improve rendering performance on windows ( #47 )
...
* feat: to ignore the codepoint 0
* feat: hide cursor whole rendering phase
* feat: change EraseDown timing
* feat: add sleep
* feat: to async Read on windows
* style: goimports
* refactor: use defer
* feat: remove ignore flush
* chore: remove ignore output
2018-02-18 22:27:59 +09:00
Nao YONASHIRO
2e8a01dd61
docs: update toPos document
2018-02-16 11:34:02 +09:00
Nao YONASHIRO
40755ea9f8
fix: support linewrap on windows
2018-02-16 11:34:01 +09:00
Nao YONASHIRO
fbefae2e24
chore: fixed typo
2018-02-14 19:58:20 +09:00
Nao YONASHIRO
2a35ceea89
fix: fix runtime error when r.col == 0
2018-02-14 19:50:00 +09:00
c-bata
12250c6c07
Fix some lint errors
2018-02-14 01:14:22 +09:00
Nao YONASHIRO
4581909538
fix: fix panic when len(formatted) == 0
2018-02-13 23:34:00 +09:00
Nao YONASHIRO
5f0f837e16
feat: linewrap support ( #35 )
...
* feat: linewrap support
* feat: support Terminal.app
* fix: fix corner case of renderCompletion
* refactor: remove verbose method
* refactor: inlining to stringWidth
2018-02-13 23:09:27 +09:00
c-bata
a34adaee8d
Add comment of the case TIOCGWINSZ returns 0,0
2018-02-13 22:03:18 +09:00
Bradley Cicenas
5f82ed8527
skip line erasing on render when window size is not yet available
2018-02-12 09:23:00 -05:00
Allajah
e15ebadefe
Support updating the prefix dynamiacally ( #30 )
...
* Make possible to change the prefix dynamically
* Add an example for using live-prefix
* Apply live-prefix if it's enabled
* Fix: rendering issue happened when the prefix is empty string Close #27
* Fix the title of propmt
* Remove an excessive blank line
* Refactor: Call `*Render.getCurrentPrefix()` in renderPrefix()
2018-02-12 20:00:48 +09:00
Nao YONASHIRO
63f3b83828
docs: add comments about a width of the scrollbar
2018-02-12 18:53:15 +09:00
Nao YONASHIRO
d3c627faf4
fix: add scrollbar width
2018-02-12 18:50:42 +09:00
Nao YONASHIRO
63302a5036
feat: implement pagination
2018-02-12 17:40:47 +09:00
c-bata
b825471eb8
Fix the cursor position when given accent letters
2017-09-06 03:21:08 +09:00
c-bata
f8cde79229
Add some doc comments
2017-08-22 00:47:15 +09:00
c-bata
3e90ac1b91
Refactor variable names
2017-08-12 18:59:10 +09:00
c-bata
3240009ad5
Refactor and fix bug
2017-08-12 18:55:36 +09:00
c-bata
4c3cbd3c3c
Add flush
2017-08-11 18:24:44 +09:00
c-bata
e871f177ec
Refactor completions
2017-08-09 21:33:47 +09:00
c-bata
ad17465489
Remove output options
2017-08-06 15:31:44 +09:00
c-bata
bdc32514f8
Rename Completion to Suggest
2017-08-04 20:30:50 +09:00
c-bata
8aeed013a4
Add refactor change
2017-08-04 16:23:18 +09:00
c-bata
5df371652b
Refactor handling input
2017-07-24 00:56:41 +09:00
c-bata
4f5eedaa32
Fix max width handling
2017-07-19 16:06:02 +09:00
c-bata
6feb776763
Set bold option
2017-07-19 01:16:57 +09:00
c-bata
256b0757ae
Remove break line when display result
2017-07-19 00:44:35 +09:00
c-bata
11deac9d5d
Rename Suggestion with Completion
2017-07-19 00:38:08 +09:00
c-bata
2e1d7d8eb0
Complete with description
2017-07-19 00:36:16 +09:00
c-bata
c7333f7c05
Add Suggestion struct with Description
2017-07-18 23:28:54 +09:00
c-bata
3cad620d16
Update renderer
2017-07-18 22:24:12 +09:00
c-bata
d6c1292b21
Avoid blocking when execution
2017-07-18 20:48:50 +09:00
c-bata
3f0334a649
Add WriteRawStr
2017-07-18 19:06:38 +09:00
c-bata
f3212afbf7
Run goimports
2017-07-18 05:32:14 +09:00
c-bata
050e78b823
Move go files to project root
2017-07-18 05:27:57 +09:00