diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-02-18 19:55:04 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-02-18 19:55:04 -0800 |
commit | 3434c8a937e39910d982130a88097da490304eb5 (patch) | |
tree | f81bee35ef66fbca793ab33e9326320ad39dd1cc /linenoise/linenoise.h | |
parent | 843347592f7b4143f8a11ef29ff8c633489ee3c3 (diff) | |
download | txr-3434c8a937e39910d982130a88097da490304eb5.tar.gz txr-3434c8a937e39910d982130a88097da490304eb5.tar.bz2 txr-3434c8a937e39910d982130a88097da490304eb5.zip |
listener: if no new lines, don't save history.
* linenoise/linenoise.c (lino_have_new_lines): New function.
* linenoise/linenoise.h (lino_have_new_lines): Declared.
* parser.c (hist_save): Do nothing if lino_have_new_lines
returns false.
Diffstat (limited to 'linenoise/linenoise.h')
-rw-r--r-- | linenoise/linenoise.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/linenoise/linenoise.h b/linenoise/linenoise.h index 05f66632..da6e93de 100644 --- a/linenoise/linenoise.h +++ b/linenoise/linenoise.h @@ -115,6 +115,7 @@ int lino_hist_add(lino_t *, const wchar_t *line); int lino_hist_set_max_len(lino_t *, int len); int lino_hist_save(lino_t *, const wchar_t *filename, int new_only); int lino_hist_load(lino_t *, const wchar_t *filename); +int lino_have_new_lines(lino_t *); void lino_set_result(lino_t *, wchar_t *); /* takes ownership of malloced mem; modifies it */ int lino_clear_screen(lino_t *); void lino_set_multiline(lino_t *, int ml); |