aboutsummaryrefslogtreecommitdiffstats
path: root/src/lush.c
diff options
context:
space:
mode:
authorGravatar BanceDev 2025-02-11 14:38:35 -0500
committerGravatar BanceDev 2025-02-11 14:38:35 -0500
commita1cdb80a68ed8821c2ed9f22f520cc4e6df8a626 (patch)
treeebe6869df98e954b9453f5d2c7b0f5aee18fa3a2 /src/lush.c
parentv0.3.0 (diff)
add api method to enable/disable inline suggestions
Diffstat (limited to 'src/lush.c')
-rw-r--r--src/lush.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lush.c b/src/lush.c
index 2925272..f815fa5 100644
--- a/src/lush.c
+++ b/src/lush.c
@@ -617,7 +617,8 @@ static void reprint_buffer(char *buffer, int *last_lines, int *pos,
printf("\r\033[K");
printf("%s ", prompt);
printf("%s", buffer);
- printf("\033[0;33m%s\033[0m ", suggestion);
+ if (suggestion_enable)
+ printf("\033[0;33m%s\033[0m ", suggestion);
// move cursor up and to the right to be in correct position
if (cursor_pos > 0)