From bc99b3dd48fab0f9688b8c44b8da8890041961be Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Sat, 17 Jul 2021 12:44:01 +0200
Subject: Add a right-side prompt to the search
---
sdn.cpp | 31 ++++++++++++++++++++++++-------
1 file changed, 24 insertions(+), 7 deletions(-)
diff --git a/sdn.cpp b/sdn.cpp
index 0e81a98..8d07221 100644
--- a/sdn.cpp
+++ b/sdn.cpp
@@ -527,16 +527,17 @@ static struct {
bool out_of_date; ///< Entries may be out of date
const wchar_t *editor; ///< Prompt string for editing
+ wstring editor_info; ///< Right-side prompt while editing
wstring editor_line; ///< Current user input
int editor_cursor = 0; ///< Cursor position
bool editor_inserting; ///< Inserting a literal character
void (*editor_on_change) (); ///< Callback on editor change
void (*editor_on_confirm) (); ///< Callback on editor confirmation
- enum { AT_CURSOR, AT_BAR, AT_CWD, AT_INPUT, AT_CMDLINE, AT_COUNT };
- chtype attrs[AT_COUNT] = {A_REVERSE, 0, A_BOLD, 0, 0};
+ enum { AT_CURSOR, AT_BAR, AT_CWD, AT_INPUT, AT_INFO, AT_CMDLINE, AT_COUNT };
+ chtype attrs[AT_COUNT] = {A_REVERSE, 0, A_BOLD, 0, A_ITALIC, 0};
const char *attr_names[AT_COUNT] =
- {"cursor", "bar", "cwd", "input", "cmdline"};
+ {"cursor", "bar", "cwd", "input", "info", "cmdline"};
map