summaryrefslogtreecommitdiffhomepage
path: root/src/edit_libedit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/edit_libedit.c')
-rw-r--r--src/edit_libedit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/edit_libedit.c b/src/edit_libedit.c
index 6a32db7..d9282fc 100644
--- a/src/edit_libedit.c
+++ b/src/edit_libedit.c
@@ -68,7 +68,7 @@ bool edit_usable(void) {
* @param prompt Text to show before the line.
* @param len Receives the length of the line.
* @return The line without its newline, valid until the next call;
- * NULL at end of input.
+ * nullptr at end of input.
*/
char *edit_readline(const char *prompt, size_t *len) {
static char *line;
@@ -77,12 +77,12 @@ char *edit_readline(const char *prompt, size_t *len) {
el = el_init("zash", stdin, stderr, stderr);
el_hist = history_init();
if (!el || !el_hist)
- return NULL;
+ return nullptr;
history(el_hist, &ev, H_SETSIZE, 100000);
el_set(el, EL_HIST, history, el_hist);
el_set(el, EL_PROMPT, prompt_cb);
el_set(el, EL_SIGNAL, 0);
- el_source(el, NULL);
+ el_source(el, nullptr);
}
el_set(el, EL_EDITOR, opt.vi ? "vi" : "emacs");
history(el_hist, &ev, H_CLEAR);
@@ -108,7 +108,7 @@ char *edit_readline(const char *prompt, size_t *len) {
trap_poll(); /* ^C abandons the line and does not return */
continue;
}
- return NULL;
+ return nullptr;
}
}