packages feed

isocline 1.0.1 → 1.0.2

raw patch · 5 files changed

+8/−9 lines, 5 filessetup-changedPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

− Setup.hs
@@ -1,2 +0,0 @@-import Distribution.Simple-main = defaultMain
include/isocline.h view
@@ -45,7 +45,7 @@ /// \{  /// Isocline version: 102 = 1.0.2.-#define IC_VERSION   (101)    /// 1.0.0+#define IC_VERSION   (102)     /// Read input from the user using rich editing abilities.
isocline.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           isocline-version:        1.0.1+version:        1.0.2 synopsis:       A portable alternative to GNU Readline description:    ![logo](https://raw.githubusercontent.com/daanx/isocline/main/doc/isocline-inline.svg) 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/isocline.c view
@@ -539,10 +539,10 @@   bbcode_style_def(env->bbcode, "ic-prompt",    "ansi-green" );   bbcode_style_def(env->bbcode, "ic-info",      "ansi-darkgray" );   bbcode_style_def(env->bbcode, "ic-diminish",  "ansi-lightgray" );-  bbcode_style_def(env->bbcode, "ic-emphasis",  "color=#FFFFD7" );+  bbcode_style_def(env->bbcode, "ic-emphasis",  "#ffffd7" );   bbcode_style_def(env->bbcode, "ic-hint",      "ansi-darkgray" );-  bbcode_style_def(env->bbcode, "ic-error",     "color=#D70000" );-  bbcode_style_def(env->bbcode, "ic-bracematch","color=#F7DC6F" );+  bbcode_style_def(env->bbcode, "ic-error",     "#d70000" );+  bbcode_style_def(env->bbcode, "ic-bracematch","ansi-white"); //  color = #F7DC6F" );    bbcode_style_def(env->bbcode, "keyword",  "#569cd6" );   bbcode_style_def(env->bbcode, "control",  "#c586c0" );
src/term.c view
@@ -555,7 +555,8 @@ // direct write to the console without further processing static bool term_write_console(term_t* term, const char* s, ssize_t n ) {   DWORD written;-  WriteConsoleA(term->hcon, s, (DWORD)(to_size_t(n)), &written, NULL);+  // WriteConsoleA(term->hcon, s, (DWORD)(to_size_t(n)), &written, NULL);+  WriteFile(term->hcon, s, (DWORD)(to_size_t(n)), &written, NULL); // so it can be redirected   return (written == (DWORD)(to_size_t(n))); } @@ -1049,7 +1050,7 @@   SetConsoleOutputCP(CP_UTF8);   if (term->hcon_mode == 0) {     // first time initialization-    DWORD mode = ENABLE_PROCESSED_OUTPUT | ENABLE_LVB_GRID_WORLDWIDE;   // for \r \n and \b    +    DWORD mode = ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT | ENABLE_LVB_GRID_WORLDWIDE;   // for \r \n and \b         // use escape sequence handling if available and the terminal supports it (so we can use rgb colors in Windows terminal)     // Unfortunately, in plain powershell, we can successfully enable terminal processing     // but it still fails to render correctly; so we require the palette be large enough (like in Windows Terminal)