Commit Graph

9 Commits

Author SHA1 Message Date
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
3e90ac1b91 Refactor variable names 2017-08-12 18:59:10 +09:00
c-bata
bdc32514f8 Rename Completion to Suggest 2017-08-04 20:30:50 +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
050e78b823 Move go files to project root 2017-07-18 05:27:57 +09:00