isocline 1.0.8 → 1.0.9
raw patch · 3 files changed
+13/−8 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- include/isocline.h +3/−3
- isocline.cabal +1/−1
- src/completions.c +9/−4
include/isocline.h view
@@ -415,13 +415,13 @@ const char* ic_completion_input( ic_completion_env_t* cenv, long* cursor ); /// Get the completion argument passed to `ic_set_completer`.-void* ic_completion_arg( ic_completion_env_t* cenv );+void* ic_completion_arg( const ic_completion_env_t* cenv ); /// Do we have already some completions?-bool ic_has_completions( ic_completion_env_t* cenv );+bool ic_has_completions( const ic_completion_env_t* cenv ); /// Do we already have enough completions and should we return if possible? (for improved latency)-bool ic_stop_completing(ic_completion_env_t* cenv);+bool ic_stop_completing( const ic_completion_env_t* cenv); /// Primitive completion, cannot be used with most transformers (like `ic_complete_word` and `ic_complete_qword`).
isocline.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: isocline-version: 1.0.8+version: 1.0.9 synopsis: A portable alternative to GNU Readline description:  A Haskell wrapper around the [Isocline C library](https://github.com/daanx/isocline#readme) which can provide an alternative to GNU Readline. (The Isocline library is included whole and there are no runtime dependencies). Please see the [readme](https://github.com/daanx/isocline/haskell#readme) on GitHub for more information.
src/completions.c view
@@ -153,12 +153,17 @@ *arg = cms->completer_arg; } -ic_public bool ic_has_completions( ic_completion_env_t* cenv ) {- return (cenv->env->completions->count > 0);++ic_public void* ic_completion_arg( const ic_completion_env_t* cenv ) {+ return (cenv == NULL ? NULL : cenv->env->completions->completer_arg); } -ic_public bool ic_stop_completing(ic_completion_env_t* cenv) {- return (cenv->env->completions->completer_max <= 0);+ic_public bool ic_has_completions( const ic_completion_env_t* cenv ) {+ return (cenv == NULL ? false : cenv->env->completions->count > 0);+}++ic_public bool ic_stop_completing( const ic_completion_env_t* cenv) {+ return (cenv == NULL ? true : cenv->env->completions->completer_max <= 0); }